Closed Overlap0190 closed 3 weeks ago
Hi, I confirm, I found the cause.
Note: another problem I see is checkboxState
because every time you open the node dialog, commandSelection
will either be forced all selected or all deselected. In short, it doesn't keep its saved state
@GogoVega Thank you for the fast fix.
Note: another problem I see is
checkboxState
because every time you open the node dialog,commandSelection
will either be forced all selected or all deselected. In short, it doesn't keep its saved state
I had exactly this problem and tried to solve it with the checkboxState variable. So far it works but it seems to me that this is not really a Node-RED issue, isn't it?
Yes, not an NR issue, it's linked to the editor so you shouldn't save its state in the node.
I recommend:
RED.events.on("editor:open", function () {})
to ignore the selection/deselection until the node is opened (finished preparing)Yes, not an NR issue, it's linked to the editor so you shouldn't save its state in the node.
I recommend:
* a three-state button * two toggle buttons * use `RED.events.on("editor:open", function () {})` to ignore the selection/deselection until the node is opened (finished preparing)
I chose a different approach by replacing .on("change", function () {})
with .on("click", function () {})
. Now it behaves exactly like I want it to.
Current Behavior
Hello, I'm having troubles with the TypedInput widget. I created a little demo project that consists of two elements a checkbox and a TypedInput field with multiple selectable elements. So when the checkbox is checked all elements in the TypedInput field should be selected and when unchecked all elements should be deselected. The deselecting doesn't work correctly. If all elements are deselected with the checkbox the text in the TypedInput field changes from X selected to 0 selected but when the TypedInput list is opened suddenly all of the elements are selected and after closing the list the text changes to X selected. If the edit window is closed with done and reopened after unchecking the checkbox the elements in the TypedInput list are all deselected like I would expect.
Expected Behavior
I would expect the TypedInput field list to have all elements deselected when setting the value with an empty string.
Steps To Reproduce
Example flow
demo-node.html:
demo-node.ts:
Environment