I would like to be able to edit some component properties of child components. Say for example that I want to create a wrapper component Wrapper
that changes the value of some_prop
to some_value
of its child component (let’s assume that there is one and only one child for simplicity). I can do the edit itself like this,
const Wrapper = ({children}) => {
children.props._dashprivate_layout.props.some_prop = "some_value"
return <Fragment>{children}</Fragment>;
}
I have confirmed that it works if i read the value of some_prop
from a callback in Dash. However, the value change does not cause a callback invocation.
I believe that what I essentially need to do is call setProps
on the child object to invoke the callback - but is that possible at all? How could I do that? Maybe @chriddyp or @alexcjohnson knows?
Any ideas are welcome