plotly / dash-html-components

OBSOLETE - now part of https://github.com/plotly/dash
https://dash.plotly.com
Other
153 stars 49 forks source link

add persistence to html.Button's n_click property #197

Open michaelbabyn opened 3 years ago

michaelbabyn commented 3 years ago

I wonder if it makes sense to add persistence to html.Button since n_clicks is often used as an input to callbacks.

cc @plotly/dash-core , @sudburyrob

alexcjohnson commented 3 years ago

Interesting… normally n_clicks is used as a trigger, it’s value irrelevant. Do you have an example use case for persistence here?

michaelbabyn commented 3 years ago

The use case here is a multipage app that generates a graph after being triggered by a button click (which the users presses after secting a couple of other controls which are used as State). So the value of n_clicks would in effect be storing "whether the user had decided to generate a graph or not".