Hello everyone, i have a question concerning the usage of dispatched state props in data actions.
Can i dispatch a state prop to a widget by its widgetId and read that value in the concerned widget itself without opening the widget ? (when in a widget controller)
This dispatched state prop is used to conditionnally show a FloatingPanel on the map, but this FloatingPanel is placed inside a widget, so what happens is whenever i activate the data action and the widget is still closed nothing happens.
A widget in a controller will not load itself before it's opened(performance consideration), so a never-opened widget can't react to the dispatched stat prop.
Once it is opened, I think the dispatching will work.
As @Allen_Zhang said, a Widget in a Widget Controller will not be able to respond until it is first opened. A workaround may be to design your Widget to only render a Button when in an inactive state and open up to reveal its full functionality when the Button is pressed or it receives a Message from another Widget.