Select
vf-select
- select list
multiple
boolean
optional
select2
boolean
optional
Use select2 (4.0.0 Only)options
object
optional
Select2 optionshtml
boolean
By default items are passed directly to the select2 constructor, which is tasked with rendering the actual HTML. Use this option to render the items directly in the template. (seefilter-by
note for a case where this might be useful)container-class
string
optional
When using select2, use this to set a class for the container and the dropdown. The class will be preceded by the entity (e.gmodal
would generatedropdown-modal
andcontainer-modal
)items
array of objects
optional
- E.g
Defaults to an empty array. When using remote options fetching ([ {id:1, text:'Option A'}, {id:2, text:'Option B'}, {id:3, text:'Option C'} ]
ajax-url
) pass to this option any initially selected values.placeholder
string
Default option text (value will be an empty string). Default:Select Option
. Displayed only for a single select, which is not aselect2
.no-default
boolean
optional
Don't display the default optionajax-url
string
optional
Fetch options from remote server using this url.callback
function
optional
When usingajax-url
this can be used to process the raw server output before it is passed to presentation.filter-by
string
optional
Dynamically filter list options by another select field.Receives the name of the other field. The list items should each have a key with the same name, whose value will be compared against the filtering field's value. When the filtering field has no value all items are presented. When the list is fetched remotely the filtering field value is sent as a request parameter.
Note: Due to issues with dynamically updating data passed to
select2
on v4.0.0 (https://github.com/select2/select2/issues/2830), This option will currently work on aselect2
with local data only when thehtml
prop is set totrue
.