Open AnnMarieW opened 2 months ago
Hi @AnnMarieW, you are writing a callback on a component passed as a property. Are callbacks supposed to work on them now?
Hello @snehilvj,
The callback is to demonstrate the issue with the setProps and trying to increase the n_clicks value of the individual component.
I'm not sure if notifications are setup this way, I think if this was to work, would the notification need to be rerendered?
The component triggers a rerender in itself, but because the prop value doesn't increase, a new test for n_clicks in the clipboard fails.
Hi @snehilvj
If you take a look at the examples in the issue in the Dash repo, you can see what was originally reported is that the dcc.Clipboard
stopped working with dmc.Notification
.
It looked like it was an issue with dcc.Clipboard
but that component works with other Dash components when the component is used as a prop. The problem seems to be that the n_clicks
is no longer updated when components are used with dmc.Notification
This issue was initially reported in the Dash GitHub https://github.com/plotly/dash/issues/2830, but it seems to be an issue only with the
dmc.Notification
component.When using components as props, the component's onClick handler no longer works correctly. Note that in this example if you click on the dmc.Button inside the
dmc.Notification
multiple times then_clicks
remains at 1.