Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.7 KiB

PropertySelect

Extends Property

Properties

  • options Array<Object> Array of option definitions.
    options: [
     { id: '100', label: 'Set 100' },
     { id: '200', label: 'Set 200' },
    ]
    

getOptions

Get available options.

Returns Array<Object> Array of options

getOption

Get current selected option or by id.

Parameters

Returns (Object | null)

setOptions

Update options.

Parameters

  • value Array<Object> New array of options, eg. [{ id: 'val-1', label: 'Value 1' }] (optional, default [])

addOption

Add new option.

Parameters

  • value Object Option object, eg. { id: 'val-1', label: 'Value 1' }

getOptionId

Get the option id from the option object.

Parameters

Returns String Option id

getOptionLabel

Get option label.

Parameters

  • id (String | Object) Option id or the option object

  • opts Object Options (optional, default {})

    • opts.locale Boolean Use the locale string from i18n module (optional, default true)

Returns String Option label