You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful for clientside callbacks to be able to conditionally update components. This is not supported right now (as far as I can tell). This should be pretty simple, my idea would be to define
window.dash_clientside.no_update={};
then in updateClientsideOutput just conditionally block updating by adding
Good idea! Yes, I think everything you're proposing makes sense, feel free to make a PR. One thing I'd add then is that no_update and PreventUpdate need to be forbidden as namespaces in dash_clientside.
Yes, this is what I wanted to get feedback on first. I'm not sure that dash_clientside is actually the best place to put these as we expect it to be modified by users. The only way I see to do this reliably is to insert no_update and PreventUpdate as non-writable attributes after all user callbacks are loaded (practically, just insert them before invoking any callbacks), but then what do we do if a user has already defined them? I guess just gracefully proceed as if no_update and PreventUpdate didn't exist, otherwise it could be a breaking change.
I think that’s the right place. Yes, you could argue that forbidding those two names is a breaking change, but it seems to me extremely unlikely anyone has used those as a namespace so far. I’d put a check on the Python side that errors if those namespaces are referenced, and add them to dash_clientside during callback invocation.
Activity
alexcjohnson commentedon Oct 11, 2019
Good idea! Yes, I think everything you're proposing makes sense, feel free to make a PR. One thing I'd add then is that
no_updateandPreventUpdateneed to be forbidden as namespaces indash_clientside.jjaraalm commentedon Oct 12, 2019
Yes, this is what I wanted to get feedback on first. I'm not sure that
dash_clientsideis actually the best place to put these as we expect it to be modified by users. The only way I see to do this reliably is to insertno_updateandPreventUpdateas non-writable attributes after all user callbacks are loaded (practically, just insert them before invoking any callbacks), but then what do we do if a user has already defined them? I guess just gracefully proceed as ifno_updateandPreventUpdatedidn't exist, otherwise it could be a breaking change.Is there a better namespace to put these in?
alexcjohnson commentedon Oct 13, 2019
I think that’s the right place. Yes, you could argue that forbidding those two names is a breaking change, but it seems to me extremely unlikely anyone has used those as a namespace so far. I’d put a check on the Python side that errors if those namespaces are referenced, and add them to
dash_clientsideduring callback invocation.jjaraalm commentedon Oct 14, 2019
Sounds like a plan. I'll put one together shortly.
Merge pull request plotly#963 from AnnMarieW/tooltip-fix-rangeslider
Merge pull request #963 from AnnMarieW/tooltip-fix-rangeslider