A platform for community discussion. Free, open, simple.
FIX: attempts to listen more reliably to scopedCategoryId changes (#9431)
Joffrey JAFFEUX5a8a844e4e29
diff --git a/app/assets/javascripts/select-kit/components/category-chooser.js b/app/assets/javascripts/select-kit/components/category-chooser.jsindex 76c47a6a180..423481706a1 100644--- a/app/assets/javascripts/select-kit/components/category-chooser.js+++ b/app/assets/javascripts/select-kit/components/category-chooser.js@@ -85,13 +85,17 @@ export default ComboBoxComponent.extend({}},- content: computed("selectKit.{filter,options.scopedCategoryId}", function() {- if (!this.selectKit.filter && this.selectKit.options.scopedCategoryId) {- return this.categoriesByScope(this.selectKit.options.scopedCategoryId);- } else {- return this.categoriesByScope();+ content: computed(+ "selectKit.filter",+ "selectKit.options.scopedCategoryId",+ function() {+ if (!this.selectKit.filter && this.selectKit.options.scopedCategoryId) {+ return this.categoriesByScope(this.selectKit.options.scopedCategoryId);+ } else {+ return this.categoriesByScope();+ }}- }),+ ),categoriesByScope(scopedCategoryId = null) {const categories = this.fixedCategoryPositionsOnCreate