0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/custom-wizard-field-topic.js

23 Zeilen
376 B
JavaScript

2024-06-20 11:25:57 +02:00
import Component from "@ember/component";
export default Component.extend({
topics: [],
didInsertElement() {
2024-11-22 17:11:51 +01:00
this._super(...arguments);
2024-06-20 11:25:57 +02:00
const value = this.field.value;
if (value) {
this.set("topics", value);
}
},
actions: {
2024-06-20 13:06:02 +02:00
setValue(_, topics) {
2024-06-20 11:25:57 +02:00
if (topics.length) {
this.set("field.value", topics);
}
},
2024-06-20 13:06:02 +02:00
},
2024-06-20 11:25:57 +02:00
});