mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 15:56:31 +08:00
21 lines
588 B
JavaScript
21 lines
588 B
JavaScript
|
import { computed } from "@ember/object";
|
||
|
import { makeArray } from "discourse-common/lib/helpers";
|
||
|
import MultiSelectComponent from "select-kit/components/multi-select";
|
||
|
|
||
|
export default MultiSelectComponent.extend({
|
||
|
pluginApiIdentifiers: ["watched-words"],
|
||
|
classNames: ["watched-word-input-field"],
|
||
|
|
||
|
selectKitOptions: {
|
||
|
autoInsertNoneItem: false,
|
||
|
fullWidthOnMobile: true,
|
||
|
allowAny: true,
|
||
|
none: "admin.watched_words.form.words_or_phrases",
|
||
|
},
|
||
|
|
||
|
@computed("value.[]")
|
||
|
get content() {
|
||
|
return makeArray(this.value).map((x) => this.defaultItem(x, x));
|
||
|
},
|
||
|
});
|