0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-10-18 20:02:38 +02:00
discourse-custom-wizard/assets/javascripts/discourse/components/custom-wizard-field-topic.js.es6
2024-06-20 13:06:02 +02:00

21 Zeilen
345 B
JavaScript

import Component from "@ember/component";
export default Component.extend({
topics: [],
didInsertElement() {
const value = this.field.value;
if (value) {
this.set("topics", value);
}
},
actions: {
setValue(_, topics) {
if (topics.length) {
this.set("field.value", topics);
}
},
},
});