mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Revert and fix an undefined value returned instead of a false value
This commit is contained in:
parent
67cdf3ef96
commit
6c14ed0ef5
@ -734,12 +734,12 @@
|
||||
}
|
||||
if (menu.opts.multiple) {
|
||||
var selected = {};
|
||||
this.value().split(",").forEach(function(f) {
|
||||
selected[f] = true;
|
||||
})
|
||||
this.value().split(",").forEach(function(f) {
|
||||
selected[f] = true;
|
||||
});
|
||||
menu.find('input[type="checkbox"]').each(function() {
|
||||
$(this).prop("checked",selected[$(this).data('value')])
|
||||
})
|
||||
$(this).prop("checked", selected[$(this).data('value')] || false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -830,13 +830,7 @@
|
||||
this.input.trigger('change',[this.propertyType,this.value()]);
|
||||
}
|
||||
} else {
|
||||
this.optionSelectLabel.text(o.length + " selected");
|
||||
if (this.optionMenu) {
|
||||
this.optionMenu.find('input[type="checkbox"]').prop("checked", false);
|
||||
for (const selectedOption of (this.value()?.split(",") || [])) {
|
||||
this.optionMenu.find("[value='" + selectedOption + "']").find("input").prop("checked", true);
|
||||
}
|
||||
}
|
||||
this.optionSelectLabel.text(o.length+" selected");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user