I don’t understand how am I rewriting the buttons? I am just removing one child and giving the remaining chidren. Does this rewrite the button?
Yes, it does. It may not look like it, as if you inspect children
, you will see a nested dictionary with the JSON representation of the components defined in the dbc.Container
, but effectively you are just rewriting them.
Dash does not support partial updates of props (props being the “parameters” you can pass to a component when initialising it or in a callback), so I don’t think there is a better way to do what you are doing. You just have to work with it and be aware that the callbacks depending on components being rewritten will be triggered again.