furo-ui5-select #
@furo/ui5 v1.18.0
import '@furo/ui5/src/furo-ui5-select.js';
exports FuroUi5Select js
mixes FieldNodeAdapter
Summary: data select field
Description #
The furo-ui5-select component is used to create a drop-down list. The items inside the furo-ui5-select define the available options by using the ui5-option component. Use the function bindOptions to bind a RepeaterNode as a option list.
|
|
Example with options from specs #
A simple way to use the segmented button is, uising it with specified options for a string type.
Defining a type with the options may look like a big overhead, but it let you switch the UI implementation by just changing the tag name.
The labels in the demo are not translated for better readability.
Markup #
|
|
Type definition #
look at
fields.sex.meta.options.list
|
|
Example with bindOptions #
Set the id of the selected optioin to a value which is not in the list and press load options again.
Markup #
|
|
Attributes and Properties #
activeFieldBinding #
default: false
Flag to indicate if a field is attached
Default: false
idFieldPath #
default: 'id'
Defines the field path that is used from the bound RepeaterNode (bindOptions) to identify the option items.
Point-separated path to the field
E.g. data.partner.ulid
default: id
This attribute is related to the option list
displayFieldPath #
default: 'display_name'
Defines the field path that is used from the bound RepeaterNode (bindOptions) to display the option items.
Point-separated path to the field
E.g. data.partner.display_name
default: display_name
This attribute is related to the option list
valueFieldPath #
default: 'id'
Defines the field path that is used to update the bound component if the user has selected an option.
Point-separated path to the field
Must be set if a data binding is specified.
default: id
This attribute is related to the option list. optionList[selected].valueFieldPath ==> bound FieldNode
boundFieldIdPath #
default: 'id'
Defines the id field path of the bound FieldNode.
Point-separated path to the field
Must be set if a data binding is specified with a complex type.
default: id
This attribute is related to the bound FieldNode.
Events #
options-updated #
at-options-updated
→ optionNodeList
Fired after the option list was rebuilt.
item-selected #
at-item-selected
→ selectedOption
Fired when the item of the dropdown list is selected.
furo-value-changed #
at-furo-value-changed
→ selectedOption
Fires the field value when it changes.
Methods #
readAttributes #
readAttributes() ⟹ void
*
→
fn-read-attributes
Reads the attributes which are set on the component dom.
those attributes can be set. value-state
, required
,readonly
,disabled
, value-field-path
, display-field-path
Use this after manual or scripted update of the attributes.
bindOptions #
bindOptions(repeaterNode `` ) ⟹ void
`` → fn-bind-options
Here a RepeaterNode can be connected to the component as an option list.
- repeaterNode
setOptions #
setOptions(arr *rawJson*
) ⟹ boolean
→
fn-set-options
inject raw data as options
- arr
- rawJson raw data array
bindData #
bindData(fieldNode FieldNode
) ⟹ boolean
FieldNode
→
fn-bind-data
Overridden bindData of FieldNodeAdapter
- fieldNode
onFnaFieldStateChanged #
onFnaFieldStateChanged(state `` ) ⟹ void
`` → fn-on-fna-field-state-changed
set the value state
- state
selectOptionById #
selectOptionById(id *
) ⟹ void
*
→
fn-select-option-by-id
Selects an option by id. The id field must be comparable.
- id must match the data