Once an appointment is selected, the AppointmentTooltip pops up. If the underlying data is changed by a third party, the contents of the tooltip aren't refreshed.
Update the AppointmentTooltip contents when the selected appointment data changes.
If this is the intended behavior, what is the correct approach to work around it?
Hi @VeegaP,
We do not consider this behavior, the AppointmentTooltip shows static appointment data when you are clicking on an appointment. Implementation of this feature can lead to many unexpected errors, so we are not sure we will implement it in the near future.
BTW, you can manage the AppointmentTooltip state by passing the appointmentMeta property into it and change it when you receive new data. Or turn off a tooltip's visibility when you receive new data by the visible property.
Could you describe your use case, what happens in your application, how many updates you have in it? This information will be very helpful to us.
Hi @MaximKudriavtsev ,
thanks for the feedback.
My application is a Scheduler shared between multiple clients, each client connects via websockets to the server and listens to the appointments data. Whenever this data changes, each client is notified and proceeds to update its state (the scheduler data).
In all fairness I'm relatively new to the React world, and wasn't sure if this was an intended behavior or not. As such, I'm not sure what the right approach to updating the appointmentMeta would be, but I'll look into it.
Thanks!
@VeegaP,
You can find information about updating the appointmentMeta property in the following demo.
@VeegaP,
We have released the 1.11.1 version of the React Scheduler and a guide about an appointment tooltip. These demos can be useful to understand how to work with the AppointmentTooltip plugin.
@MaximKudriavtsev,
Thank you! I actually had been able to achieve what I wanted by binding the appointmentMeta property to a property in my state, that kept track of the selected appointment id and build an appointmentMeta object by finding the matching appointment and keeping the target in the state as well.
It works, but if the appointment date changes, the tooltip stays on the same target as of now. I'll look into how to work around it.
@VeegaP,
the tooltip stays on the same target as of now
Currently, I don't have an idea of how to achieve it. I think it is related to the Material-UI Popover component's behavior.
As a workaround, try displaying the AppointmentTooltip on the side of the Scheduler component at a fixed position.
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.