options
Description
specifies a set of data items that will be used as MultiCombo optionsType
array
Example
<script>
const dataset = [
{id:1, label:"First option"},
{id:2, label:"Second option"},
{id:3, label:"Third option"}
]
</script>
<MultiCombo options={dataset} value={[1,2]} />
Details
It is also possible to put data in a separate file and specify the name of the data set as a value of the options property of MultiCombo:
userlist.js
export const users = [
{id:1, label:"name1"},
{id:2, label:"name2"}
]
App.svelte
<script>
import { MultiCombo } from "wx-svelte-core";
import { users } from "../your_data/userlist";
</script>
<MultiCombo options={users} value={[1,2]}/>
Related article: Loading options
Related sample: MultiCombo