From 8561fd78d89662050320cf1b1b96fe476ccb0869 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Mon, 5 Feb 2024 14:23:08 -0600 Subject: [PATCH] DEV: Convert site-settings/category-list to glimmer component (#25571) --- .../addon/components/site-settings/category-list.gjs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/site-settings/category-list.gjs b/app/assets/javascripts/admin/addon/components/site-settings/category-list.gjs index c180dc0716d..7b0b15116f5 100644 --- a/app/assets/javascripts/admin/addon/components/site-settings/category-list.gjs +++ b/app/assets/javascripts/admin/addon/components/site-settings/category-list.gjs @@ -1,19 +1,18 @@ -import Component from "@ember/component"; -import { action, computed } from "@ember/object"; +import Component from "@glimmer/component"; +import { action } from "@ember/object"; import Category from "discourse/models/category"; import htmlSafe from "discourse-common/helpers/html-safe"; import SettingValidationMessage from "admin/components/setting-validation-message"; import CategorySelector from "select-kit/components/category-selector"; export default class CategoryList extends Component { - @computed("value") get selectedCategories() { - return Category.findByIds(this.value.split("|").filter(Boolean)); + return Category.findByIds(this.args.value.split("|").filter(Boolean)); } @action onChangeSelectedCategories(value) { - this.set("value", (value || []).mapBy("id").join("|")); + this.args.changeValueCallback((value || []).mapBy("id").join("|")); }