From e2e41ff9fe14e2159d0eb69557ac9e1547558f44 Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Wed, 3 Apr 2024 01:12:13 +0400 Subject: [PATCH] WIP: combobox options --- assets/javascripts/discourse/components/topic-assignments.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/discourse/components/topic-assignments.js b/assets/javascripts/discourse/components/topic-assignments.js index b6db4e1..239d2d4 100644 --- a/assets/javascripts/discourse/components/topic-assignments.js +++ b/assets/javascripts/discourse/components/topic-assignments.js @@ -1,5 +1,6 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; +import { action } from "@ember/object"; export default class TopicAssignments extends Component { @tracked selectedAssignmentId; @@ -15,6 +16,7 @@ export default class TopicAssignments extends Component { return this.args.assignments.map((a) => this.#toComboBoxOption(a)); } + @action synchronizeAssignment(selectedAssignmentId) { this.selectedAssignmentId = selectedAssignmentId; this.selectedAssignment = this.args.assignments[0]; // fixme andrei