Hi folks,
In my latest node I have an editableList, which needs to be disabled somehow when the config screen of my node has been opened. Afterwards they editableList can be enabled, based on the user actions.
However I don't know how to do this.
-
I have tried to disable it or set a grey background color, but none of those works:
// The editable list should be disabled, until a trace has been selected myEditableList.prop('disabled', true); myEditableList.css('background-color', "f9f9f9");
When Node-RED injects here extra elements, I can set the background color of the new element (with class red-ui-editableList-container) to grey. Then it looks disabled, but not sure any of this is possible programmatically ...
-
When I show an alert within the
addItem
function, an empty row will be added anyway:var myEditableList = $("#node-input-properties-container").editableList({ addItem: function(container,i,property) { if (...) { alert("Not possible to add items now!"); return false; }
The result:
A
return false
orthrow "some error
doesn't prevent the empty line being added ...
Does anybody know a decent way to avoid items being added, and to give the editableList somehow a disabled look?
Thanks !!
Bart