Edit in GitHubLog an issue

Multiselect component

The Multiselect component provides the interface for a list or a data set. Multiselect allows selecting multiple items.

Options

OptionDescriptionTypeDefault
component
The path to the component’s .js file in terms of RequireJS.
String
'Magento_Ui/js/form/element/multiselect'
elementTmpl
The path to the
Copied to your clipboard
.html
template of the particular field type (multiselect).
String
'ui/form/element/multiselect'
size
The number of options that are displayed in the multiselect UI.
Number
6
template
The path to the general field .html template.
String
'ui/form/field'

Source files

Extends Select

Example

Copied to your clipboard
<form>
...
<fieldset>
...
<field name="multiselect_example" formElement="multiselect">
<settings>
<dataType>text</dataType>
<label translate="true">Multiselect Example</label>
<dataScope>multiselect_example</dataScope>
</settings>
<formElements>
<multiselect>
<settings>
<options>
<option name="1" xsi:type="array">
<item name="value" xsi:type="string">1</item>
<item name="label" xsi:type="string">Option #1</item>
</option>
<option name="2" xsi:type="array">
<item name="value" xsi:type="string">2</item>
<item name="label" xsi:type="string">Option #2</item>
</option>
<option name="3" xsi:type="array">
<item name="value" xsi:type="string">3</item>
<item name="label" xsi:type="string">Option #3</item>
</option>
</options>
</settings>
</multiselect>
</formElements>
</field>
...
</fieldset>
...
</form>

Result

Multiselect Component Example

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.