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
@ -736,10 +736,10 @@
|
|||||||
var selected = {};
|
var selected = {};
|
||||||
this.value().split(",").forEach(function(f) {
|
this.value().split(",").forEach(function(f) {
|
||||||
selected[f] = true;
|
selected[f] = true;
|
||||||
})
|
});
|
||||||
menu.find('input[type="checkbox"]').each(function() {
|
menu.find('input[type="checkbox"]').each(function() {
|
||||||
$(this).prop("checked",selected[$(this).data('value')])
|
$(this).prop("checked", selected[$(this).data('value')] || false);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -831,12 +831,6 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.optionSelectLabel.text(o.length+" selected");
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user