mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 17:53:42 +08:00
cb59681d86
Major changes included: - better support for screen readers - trapping focus in modals - better tabbing order in composer - alerts on no content found/number of items found - better autofocus in modals - mini-tag-chooser is now a multi-select component - each multi-select-component will now display selection on one row
29 lines
654 B
JavaScript
29 lines
654 B
JavaScript
import { guidFor } from "@ember/object/internals";
|
|
import Component from "@ember/component";
|
|
import { computed } from "@ember/object";
|
|
import layout from "select-kit/templates/components/selected-choice";
|
|
import UtilsMixin from "select-kit/mixins/utils";
|
|
|
|
export default Component.extend(UtilsMixin, {
|
|
tagName: "",
|
|
layout,
|
|
item: null,
|
|
selectKit: null,
|
|
extraClass: null,
|
|
id: null,
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
|
|
this.set("id", guidFor(this));
|
|
},
|
|
|
|
itemValue: computed("item", function () {
|
|
return this.getValue(this.item);
|
|
}),
|
|
|
|
itemName: computed("item", function () {
|
|
return this.getName(this.item);
|
|
}),
|
|
});
|