# PropertySelect
Extends Property
# Properties
options
Array (opens new window)<Object (opens new window)> Array of option definitions.options: [ { id: '100', label: 'Set 100' }, { id: '200', label: 'Set 200' }, ]
# getOptions
Get available options.
Returns Array (opens new window)<Object (opens new window)> Array of options
# getOption
Get current selected option or by id.
# Parameters
id
String (opens new window)? Option id.
Returns (Object (opens new window) | null)
# setOptions
Update options.
# Parameters
value
Array (opens new window)<Object (opens new window)> New array of options, eg.[{ id: 'val-1', label: 'Value 1' }]
(optional, default[]
)
# addOption
Add new option.
# Parameters
value
Object (opens new window) Option object, eg.{ id: 'val-1', label: 'Value 1' }
# getOptionId
Get the option id from the option object.
# Parameters
option
Object (opens new window) Option object
Returns String (opens new window) Option id
# getOptionLabel
Get option label.
# Parameters
id
(String (opens new window) | Object (opens new window)) Option id or the option objectopts
Object (opens new window) Options (optional, default{}
)opts.locale
Boolean (opens new window) Use the locale string from i18n module (optional, defaulttrue
)
Returns String (opens new window) Option label