-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown widget loses it’s entries when switching tabs #1117
Comments
Slack conversation here: |
Can reproduce. Oddly, the dynamic data is correctly stored server-side, and persists - you can check this by looking at our behind-the-scenes debug view at So this suggests that the problem is that the @gayanSandamal can you investigate the details when you have a chance please? |
@joepavitt I'll investigate this further |
Just my 2cents, this is an issue similar to what happens in other widgets, the a possible fix is: onLoad (msg) {
// update vuex store to reflect server-state
this.$store.commit('data/bind', {
widgetId: this.id,
msg
})
this.onDynamicProperties(msg) // Get the `ui_update` properties that may exist for this widget at load time, until is properly handled in `data_tracker.mjs`, needs to be called before `this.select`
this.select(this.messages[this.id]?.payload)
}, To make sure we load the |
Should not the ui_update changes be saved in the statestore so that they are are sent up when the widget connects after a page change? |
They are saved, but my downfall right now is not including the statestore content in the @gayanSandamal this has links to a few other discussions, etc. I've been involved in over the past few weeks, so I'll likely take this one back off your hands as it could be quite the beast. |
Current Behavior
I’m setting the options of a dropdown widget at startup using msg.options which works fine. If I switch to another tab and switch back the entries are gone, they don’t seem to persist.
Expected Behavior
I would expect the options to persist between tab changes.
Steps To Reproduce
Inject options via msg.options at startup on a widget on tab A. Switch to tab B and come back to tab A, options are now gone.
Environment
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
The text was updated successfully, but these errors were encountered: