Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 10:40:28 +01:00
22 Zeilen
376 B
JavaScript
22 Zeilen
376 B
JavaScript
import Component from "@ember/component";
|
|
|
|
export default Component.extend({
|
|
topics: [],
|
|
|
|
didInsertElement() {
|
|
this._super(...arguments);
|
|
const value = this.field.value;
|
|
|
|
if (value) {
|
|
this.set("topics", value);
|
|
}
|
|
},
|
|
|
|
actions: {
|
|
setValue(_, topics) {
|
|
if (topics.length) {
|
|
this.set("field.value", topics);
|
|
}
|
|
},
|
|
},
|
|
});
|