How to refresh editableList

#1

Hi,

I have a node using an editableList.
Each item content, for this editableList, depends on an other config parameter of the node. And when this parameter changes, I would like to refresh the editableList.
I have not seen anything to do such a thing, can you help ?

Thx

0 Likes

#2

HI @Lionel

what do you mean by refresh? Empty the list and add new elements? Keep the existing items but change something about them?

0 Likes

#3

Hi @knolleary

I want to partially keep the existing data, add or remove some items.

0 Likes

#4

The docs for editableList are here: https://nodered.org/docs/api/ui/editableList/ including the addItem and removeItem functions.

0 Likes

#5

Do you suggest, I remove all the items of the EditableList and then I re-populate ?
I have tried this way, but I have had an issue with .editableList('empty'), it seems the EditableList is not cleared

0 Likes

#6

Sorry, it is my bad, I forget the # before the element name !!!
Thx, it works fine now using you suggestion.

0 Likes