Represents the universal selector.
Inherits: ValuedControl : Control : UIElement : UIElementBaseName | Type | Description |
---|---|---|
Delegate | String | Name of the delegate that will be called when the text is entered into the selector field. |
SetDelegate | String | Name of the delegate, that will be called when selecting an item in the drop-down panel. If this delegate is specified, no assignments of the associated item will be performed. |
TextValue | Object | Always a binding (Bind). Text binding. If it is specified, then when an item is selected in the list, the text will be passed to it, not the item itself. |
Align | TextAlign | Text alignment. |
Placeholder | String | Prompt. Displayed in an empty input field. Disappears when the input field receives focus. |
Style | SelectorStyle |
Selector display style. Possible values:
|
Size | ControlSize |
Item size. Possible values:
ControlSize enumeration are not supported).
|
ItemsSource | Array | Always a binding - Bind. Data source to display in the list. |
DisplayProperty | String | Name of the property of the base item that will be displayed in the selector. |
PanelPlacement | DropDownPlacement |
The direction of the selector selection panel "dropdown". Possible values:
|
ListSize | Size | Dimensions of the drop-down selector panel. |
ItemsPanel | UIElementBase | Description of the drop-down panel. In the current version, only the DataGrid item is supported as a drop-down panel. If the item is not specified, a simple list of items is used. |
NewPane | UIElementBase | Description of the panel for creating a new item. |
CreateNewCommand | BindCmd | The command that will be executed when a new item is created. |
ShowCaret | Boolean? |
Show content opening icon. If the style of the selector is
ComboBox , then the value is automatically set to True .
|
ShowClear | Boolean |
Show clear content button. Clicking this button calls the $empty
method for the associated item.
|
Base item properties |
The selector can work in two modes. Select from the list and search in the list/on the server.
The first simply emulates a combo box (ComboBox)
with additional styling options for the selection window. In this case, the collection for selection
(ItemsSource
property) and the name of the property of the associated item
(DisplayProperty
property) which should be displayed in the selector are specified.
In the second case, it is necessary to specify a delegate (Delegate
property)
which will be called occasionally when entering text in the selector field.
It is possible to create a new item if nothing is found in the list. To do this, specify the
NewPane
item creation panel and the CreateNewCommand
command..
fetch(this:IRoot, elem:IElement, text:string, all?: boolean): [] | Promise
this
- data model root.
elem
- the item associated with the selector.
text
- the text typed into the input field.
all
- a sign that it is necessary to display all values from the list. Will be true
if the ShowCaret
property is set and the user opens the selection window with a button rather than typing in a field.
The delegate should return an array of elements, or a Promise
if the elements are fetched from the server.
What the delegate returned will be displayed in the selection panel.
fetch(this:IRoot, elem:IElement): void
this
- data model root.
elem
- the set (selected in the list) item.