mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-27 02:05:26 +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/assets/javascripts | ||
| app | ||
| assets | ||
| config | ||
| db | ||
| lib | ||
| public | ||
| spec | ||
| test/javascripts | ||
| plugin.rb | ||
| README.md | ||
This plugin is still in active development and may change frequently
Documentation
The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.
For user documentation, see Discourse Chat.
For developer documentation, see Discourse Documentation.