dash-html-components icon indicating copy to clipboard operation
dash-html-components copied to clipboard

add persistence to html.Button's n_click property

Open michaelbabyn opened this issue 4 years ago • 2 comments

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

michaelbabyn avatar Jul 20 '21 18:07 michaelbabyn

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

alexcjohnson avatar Jul 20 '21 20:07 alexcjohnson

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".

michaelbabyn avatar Jul 20 '21 20:07 michaelbabyn