Hi bryntum team,
I can render the eventtooltip with the eventRecord. However, one of my requirements is that after clicking Tooltip, I send a http request, get the response data, and then use it to render eventTooltip.
How should i do to achieve it ?
I'm concerned about you injecting a render method. That's a private method. Widgets use that to insert themselves into the DOM. And floating widgets like tooltips always insert themselves into a global floatRoot DOM element which is above the body in the stacking order.
What is that about? Does it run? What does it do? You have chosen to express it with ...
What does your onBeforeShow handler do?
If you want to perform some action on mouse click anywhere in the tooltip, then you need to add a click listener to its element.
So maybe configure the tooltip with an onPaint handler:
onPaint({ source, firstPaint }) {
if (firstPaint) {
EventHelper.on({
element : source.element,
click(domEvent) {
// Respond to the click
}
}
}
}
I want to send a http request after clicking event card, and then render this eventToolTip with the http response. Where should i sent http request , and how should i do?
Attachments
Snipaste_2022-11-18_13-02-05.jpg (128.18 KiB) Viewed 547 times
renderer : async function() {
const response = await fetch(...set up the URL using this.eventRecord...);
return ...construct either an HTML string, or an Object for DomSync...
}