Closed arturv2000 closed 1 month ago
Is the change from
onLoad (msg) {
// update vuex store to reflect server-state
this.$store.commit('data/bind', {
widgetId: this.id,
msg
})
this.select(this.messages[this.id]?.payload)
},
to
onLoad (msg) {
// update vuex store to reflect server-state
this.$store.commit('data/bind', {
widgetId: this.id,
msg
})
// this.select(this.messages[this.id]?.payload)
this.onDynamicProperties(msg)
},
A valid option?
It it is, I can create a PR with this change to close this
Current Behavior
The Widget
ui-dropdown
no longer accepts/parse theoptions
part of the message that receives when it is loadedwidget-load
Was working at least in V1.8.1.
It seems that the function: https://github.com/FlowFuse/node-red-dashboard/blob/61e3d24cbed9ab588709dcfb873f0a2f69d5876d/ui/src/widgets/ui-dropdown/UIDropdown.vue#L92
Should not only call the
select
, but it seems to be more practical to callonDynamicProperties
to reload the proprieties/options/payload for this widget.Expected Behavior
Options should load on widget load based on the last message.
Steps To Reproduce
Small example:
After selecting the value on the dropdown, force a page refresh.
Environment
Have you provided an initial effort estimate for this issue?
I am not a FlowFuse team member