From 0229043906fe812eb32487a0831a716ab0625b0d Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 8 Dec 2023 17:23:01 +0100 Subject: [PATCH] FIX: categories need to be initialized so that CategorySelector defines the categoryId list https://github.com/angusmcleod/discourse/commit/dcd81d56c075c66c975320ff083e66419572ffeb --- .../discourse/components/custom-wizard-category-selector.js.es6 | 2 +- .../discourse/components/custom-wizard-field-category.js.es6 | 2 ++ plugin.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/custom-wizard-category-selector.js.es6 b/assets/javascripts/discourse/components/custom-wizard-category-selector.js.es6 index 3ddc4c00..4aa6735d 100644 --- a/assets/javascripts/discourse/components/custom-wizard-category-selector.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-category-selector.js.es6 @@ -5,7 +5,7 @@ import { makeArray } from "discourse-common/lib/helpers"; export default CategorySelector.extend({ classNames: ["category-selector", "wizard-category-selector"], content: computed( - "categories.[]", + "categoryIds.[]", "blacklist.[]", "whitelist.[]", function () { diff --git a/assets/javascripts/discourse/components/custom-wizard-field-category.js.es6 b/assets/javascripts/discourse/components/custom-wizard-field-category.js.es6 index 65e4a1c7..b6045058 100644 --- a/assets/javascripts/discourse/components/custom-wizard-field-category.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-field-category.js.es6 @@ -3,6 +3,8 @@ import Category from "discourse/models/category"; import Component from "@ember/component"; export default Component.extend({ + categories: [], + didInsertElement() { const property = this.field.property || "id"; const value = this.field.value; diff --git a/plugin.rb b/plugin.rb index a7c7c6a4..c29b64f5 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.5.3 +# version: 2.5.4 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech