Nclicks to nclicks timestamp

Can some help me, I have an app that uses n_clicks to work out the number of times a button has been clicked. I understand that n_clicks has been depreciated to n_clicks timestamp, is this true? the reason I ask, i tried installing a newer version of html-dash-components but got an error regarding n_clicks. Does anyone have any example code where n_clicks_timestamp is used?

many thanks
Andy

You can use

>>> help(html.Button)

to check what arguments are available on a component, which will often cue you in on available options.

On my copy of dash-html-components==0.11.0, both of the following show:

 |  - n_clicks (optional): An integer that represents the number of times that this element has been clicked on.
 |  - n_clicks_timestamp (optional): An integer that represents the time (in ms since 1970)

Double check what you have, but my guess is that the error your seeing may have a different cause.

2 Likes

Thanks Peter, I am new to dash, did not realise you could call help on a html.Button.