2022-04-16 00:29:35 -07:00
|
|
|
```svelte example raised
|
2022-03-29 22:06:43 -07:00
|
|
|
<script lang="ts">
|
2022-04-02 16:17:58 -07:00
|
|
|
import { CheckboxVirtualList } from "omorphia";
|
2022-03-29 22:06:43 -07:00
|
|
|
import IconStar from 'virtual:icons/heroicons-outline/star'
|
2022-04-03 11:45:04 -07:00
|
|
|
import { uniqueId } from 'omorphia/utils/uniqueId'
|
2022-03-29 22:06:43 -07:00
|
|
|
|
|
|
|
|
let options = Array(100).fill({})
|
|
|
|
|
.map(option => ({
|
|
|
|
|
label: 'Star-' + uniqueId(),
|
|
|
|
|
icon: IconStar,
|
|
|
|
|
value: uniqueId(),
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
let selected = ['2', '6']
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<CheckboxVirtualList
|
|
|
|
|
bind:value={selected}
|
|
|
|
|
{options}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
Selected: {selected}
|
|
|
|
|
```
|