From 5a8a844e4e2907f077099177d07d3a4c27571d2f Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 15 Apr 2020 19:59:27 +0200 Subject: [PATCH] FIX: attempts to listen more reliably to scopedCategoryId changes (#9431) --- .../select-kit/components/category-chooser.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/select-kit/components/category-chooser.js b/app/assets/javascripts/select-kit/components/category-chooser.js index 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