mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 07:43:43 +08:00
27 lines
574 B
JavaScript
27 lines
574 B
JavaScript
import { guidFor } from "@ember/object/internals";
|
|
import Component from "@ember/component";
|
|
import { computed } from "@ember/object";
|
|
import UtilsMixin from "select-kit/mixins/utils";
|
|
|
|
export default Component.extend(UtilsMixin, {
|
|
tagName: "",
|
|
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);
|
|
}),
|
|
});
|