0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-10-19 04:02:39 +02:00
discourse-custom-wizard/assets/javascripts/discourse/components/custom-wizard-field-topic.js.es6
Angus McLeod 1a6a9e691c wip
2024-06-20 11:25:57 +02:00

24 Zeilen
487 B
JavaScript

import { observes } from "discourse-common/utils/decorators";
import Topic from "discourse/models/topic";
import Component from "@ember/component";
export default Component.extend({
topics: [],
didInsertElement() {
const value = this.field.value;
if (value) {
this.set("topics", value);
}
console.log(this.field)
},
actions: {
setValue(topicIds, topics) {
if (topics.length) {
this.set("field.value", topics);
}
},
}
});