WIP: combobox options
This commit is contained in:
parent
caea32de44
commit
862b44fea9
|
|
@ -12,6 +12,7 @@ export default class EditTopicAssignments extends Component {
|
|||
constructor() {
|
||||
super(...arguments);
|
||||
const topicAssignment = {
|
||||
type: "Topic",
|
||||
username: "",
|
||||
group_name: "",
|
||||
status: "",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,14 @@ export default class TopicAssignments extends Component {
|
|||
}
|
||||
|
||||
get assignmentOptions() {
|
||||
const topicAssignment = { id: this.TOPIC_ID, name: "Topic" };
|
||||
return [topicAssignment];
|
||||
return this.args.assignments.map((a) => this.#toComboBoxOption(a));
|
||||
}
|
||||
|
||||
#toComboBoxOption(assignment) {
|
||||
if (assignment.type === "Topic") {
|
||||
return { id: this.TOPIC_ID, name: "Topic" };
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue