EditListSelector Component Reference

Table of Contents


Introduction

Syntax

tml`
	<EditListSelector />
`

The EditListSelector component is a component that renders a <div> with a list of selectable items. The list has a header with buttons that allow editing the list, including:

The EditListSelector component must be passed an sVar attribute specifying a Selector input state variable that contains the options and the selected value. The state variable coordinates most list actions, including item selection, item addition, item deletion, and reordering of the item list.

Attributes

Fixed options

An option of the sVar state variable may carry a truthy fixed property:

sVar.options([
	{value:'W&B report', text:'W&B report', fixed:true},
	...namedConfigurations,
]);

A fixed option is one the list always offers and the user cannot get rid of or move. It differs from an ordinary option in three ways:

The state variable must list its fixed options first: the component holds the head of the list for them but does not reorder the options itself. An option without the property behaves exactly as before, so a list with no fixed options is unaffected.

Use a fixed option for an entry that belongs to the list but is not one of the user's own items, such as a standard entry the application maintains alongside the items the user adds.

Instance methods

These methods are intended to be used by parent components to dynamically change the properties of the rendered components without re-rendering.

Inherited methods

The EditListSelector component extends Component directly, not the selector base class, so it has no setValue() or getText() methods; the selection is held in the sVar state variable.

Children

The EditListSelector component ignores any children.

DOM element properties