MultiSelect
This page explains how to use a MultiSelect widget to allow users to select multiple options from a given list.
Content properties
These properties are customizable options present in the property pane of the widget, allowing users to modify the widget according to their preferences.
Data
Source Data array<object>
Specify data as an array of objects to display options in the widget. For example:
[
{
name: "Blue",
code: "BLUE"
},
{
name: "Green",
code: "GREEN"
},
{
name: "Red",
code: "RED"
},
];
You can dynamically generate options by fetching data from queries or JS functions and binding the response to the Source Data property. For example, if you have a query named fetchData
, you can bind its response using:
{{fetchData.data}}
If you are generating options for MutliSelect widget using JS code as shown above, you must define both the Label and Value properties.
Label string
Defines the key from the Source Data property that specifies the labels for each option in the MultiSelect widget. To define Label using code, click the JS button next to the property.
Example: If you prefer the label to be displayed in lowercase, you can achieve this using the following code snippet:
{{ item.name.toLowerCase() }}
item.name
represents the Source Data's property containing the label, and the toLowerCase()
function is applied to convert the label to lowercase.