mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 21:18:34 +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>
|
||
|---|---|---|
| .. | ||
| admin | ||
| custom-proxy | ||
| deprecation-silencer | ||
| dialog-holder | ||
| discourse | ||
| discourse-i18n | ||
| discourse-markdown-it | ||
| discourse-plugins | ||
| discourse-widget-hbs | ||
| docs | ||
| ember-addons | ||
| ember-cli-progress-ci | ||
| float-kit | ||
| pretty-text | ||
| select-kit | ||
| theme-transpiler | ||
| truth-helpers | ||
| .npmrc | ||
| polyfills.js | ||