Is it possible to change EventToolTip header background color based on resourceId??
Support Forum
Yes. But i want it to change based on resourceId.
Example: In above image, i can see that it is hovered on blue background event so the header should be blue. Similarly if i hover on pink background event then header should be pink.
Right now i have added css to b-eventtootip-header which is giving me constant background color and cant find any uniq class in header tag.
eventTooltip : {
listeners : {
beforeShow({ source }) {
const { headerElement, eventRecord } = source;
// Remove the previous custom class
headerElement.classList.remove(source.resourceCls);
headerElement.classList.add(source.resourceCls = `b-resource-${eventRecord.resource.id}`);
}
}
}
See how the <header>
now has b-resource-hotel
: