Skip to content

Commit

Permalink
Merge pull request FlowFuse#802 from arturv2000/fix_dropdown_number
Browse files Browse the repository at this point in the history
Fix Dropdown not accepting Number 0 on payload
  • Loading branch information
joepavitt authored Apr 26, 2024
2 parents 0ca42aa + ac35647 commit cd0dc62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/widgets/ui-dropdown/UIDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
}
const payload = msg.payload
if (payload) {
if (payload !== undefined) {
// 2. update the selected value(s)
this.select(payload)
}
Expand Down Expand Up @@ -127,7 +127,7 @@ export default {
this.$socket.emit('widget-change', this.id, msg.payload)
},
select (value) {
if (value) {
if (value !== undefined) {
// first, if we have a single value, we need to convert it to an array
if (!Array.isArray(value)) {
value = [value]
Expand Down

0 comments on commit cd0dc62

Please sign in to comment.