Skip to content

Editor / DOM Helper / initEditableList

Function: initEditableList() ​

ts
function initEditableList<T>(params): void;

Turns an <ol> into a Node-RED editableList (rows that can be added, removed and sorted).

The widget sizes its box once, for an empty list: the helper makes it follow the height of its rows when they are added or removed.

Type Parameters ​

Type ParameterDefault type

T

any

Parameters ​

ParameterTypeDescription

params

EditableListParams<T>

See EditableListParams.

Returns ​

void

Example ​

typescript
// pug: +dxpFormRowEditableList({ id: 'rules', label: 'Rules' })
initEditableList<Rule>({
  selector: '$rules-container',
  items: this.rules,
  addItem: (row, rule) => {
    $('<input type="text">').appendTo(row).val(rule.name ?? '');
  },
});

Version v2.5.0 - Built on 2026-11-20