Open MisterSweety opened 1 year ago
Thanks @EasyEesteren - I think what's going on here is that during initial draw plotly.js is pushing some information back to figure.layout
(probably due to autorange or autosize) which triggers a relayout
event, and we don't know that this counts as part of the initialization sequence so prevent_initial_call
doesn't exclude it... but it should! There would be something similar going on in #2671 if we adjusted those props upon validating them.
@alexcjohnson Thanks for this explanation and your prompt reply! As I mentioned we implemented a fix on our end so we can work around this but I still wanted to flag this issue to your attention. Please let me know if you need anymore context or information
Bug description Hello there, I am working on a dash app in which user changes to the relayoutData of a visual e.g. changing the zoom level should trigger a callback function and I want this callback to not be run on initial_load. However, it seems that using relayoutData as an input for my callback function results in the callback being triggered on initial load regardless of whether I set prevent_initial_call=True or False. I have implemented a fix for this issue myself by using the following conditional check at the start of the callback function:
Here is the callback definition:
Context Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
below