Property `click_feature` of a `geojson` component doesn't trigger callback the second time

Hello,

I have a callback with the click_feature property of a geojson component as Input.
It works fine when I click a marker and the callback context is able to recognize the event.
However, if I click a second time on the marker, without clicking any other before, the callback is not triggered.
Is this behavior expected?

Thanks.

Yes, it is. Callbacks are only triggered on property changes (that’s a general thing in Dash). Hence if you click the same feature twice, you won’t trigger a callback the second time.

If you need to run the callback every time, you can use the n_clicks property to trigger the callback instead (and then pass click_feature as state if you need it).

1 Like

I understand, thanks Emil! :slight_smile: