FIX: attempts to listen more reliably to scopedCategoryId changes (#9431)

This commit is contained in:
Joffrey JAFFEUX 2020-04-15 19:59:27 +02:00 committed by GitHub
parent 8b2e7483b2
commit 5a8a844e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -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