I’m trying to update an icon conditionally on an onClick event, but the change isn’t being reflected in the UI.
Could you please explain why this is happening?
My goal is to dynamically update the icon_select array and have the updated icon reflected immediately after a click.
For different events, I want to display different icons based on statusSelect. For example, if the status is freeze or free, clicking the freeze icon for a particular event should toggle it to the free icon (and vice versa).
Thanks for noticing the issue. It’s the bug on our end. I’ve sent it to the dev team, and they will work on a fix.
As a workaround, you can use the following code:
// workaround
scheduler.attachEvent("onClick", function (id) {
scheduler.hideQuickInfo(id);
scheduler._quick_info_box = null; // special property for quick info node
scheduler.showQuickInfo(id)
return true;
});
It prevents to remeber already initialized quick info node, that works incorrectly. The dev team will fix it, unfortunately there is no any ETA.
After that you can specify the required buttons by using onBeforeQuickInfo hanlder, like: