The SelectTree widget allows users to select items from a tree-like structure efficiently, without the server having to generate the entire tree immediately.
Note: This widget is designed for use only with the \IPS\Helpers\Form\Node helper.
(String; optional; default 'Select')
Text to use as the placeholder when no items are selected.
(Boolean; optional; default false)
Are users allowed to select multiple items at once?
(Mixed; optional; default false)
Defines the pre-selected items as a JSON object, or false if no items are selected yet.
The URL used to fetch child items via AJAX.
Events emitted by ips.ui.selectTree
Triggered when the user selects an item in the menu. Emitted on all items in the menu.
The text of the element within the selected item, that has the attribute data-role="nodeTitle"
The ID of this item as specified by the data-id attribute on the item. Note: this is not the HTML id attribute.
Triggered when the selection in the menu changes (i.e. items are either selected or unselected). Emitted on all items in the menu.
Array containing the data-id attribute values of all currently-selected items.
Triggered when the drop-down menu is closed. Emitted on the root data-ipsSelectTree element.