mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 22:39:57 +08:00
Implement a new component called `d-multi-select` which allows to select multiple items.
It has the following features:
- accepts a `loadFn` to load data
- yield result to customise results
- yield selection to customise selection
Usage:
```gjs
<DMultiSelect
@loadFn={{this.loadData}}
@onChange={{this.onChange}}
@selection={{this.selection}}
>
<:selection as |item|>{{item.name}}</:selection>
<:result as |result|>{{result.name}}</:result>
</DMultiSelect>
```gjs
<ChatChannelMultiSelect
@onChange={{fn (mut this.selectedChannels)}}
@initialIds={{array 2}}
@selection={{this.selectedChannels}}
>
<:selection as |item|>{{item.name}}</:selection>
<:result as |result|>{{result.name}}</:result>
</ChatChannelMultiSelect>
|
||
|---|---|---|
| .. | ||
| automation | ||
| chat | ||
| checklist | ||
| discourse-details | ||
| discourse-lazy-videos | ||
| discourse-local-dates | ||
| discourse-narrative-bot | ||
| discourse-presence | ||
| footnote | ||
| poll | ||
| spoiler-alert | ||
| styleguide | ||