Select
vf-select - select list
multiplebooleanoptionalselect2booleanoptionalUse select2 (4.0.0 Only)optionsobjectoptionalSelect2 optionshtmlbooleanBy 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-bynote for a case where this might be useful)container-classstringoptionalWhen using select2, use this to set a class for the container and the dropdown. The class will be preceded by the entity (e.gmodalwould generatedropdown-modalandcontainer-modal)itemsarray of objectsoptional- E.gDefaults 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.placeholderstringDefault option text (value will be an empty string). Default:Select Option. Displayed only for a single select, which is not aselect2.no-defaultbooleanoptionalDon't display the default optionajax-urlstringoptionalFetch options from remote server using this url.callbackfunctionoptionalWhen usingajax-urlthis can be used to process the raw server output before it is passed to presentation.filter-bystringoptionalDynamically 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
select2on v4.0.0 (https://github.com/select2/select2/issues/2830), This option will currently work on aselect2with local data only when thehtmlprop is set totrue.