Skip to content

Commit

Permalink
Fix: BoxMenuGroupView updated to exclude hidden children.
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 committed Oct 19, 2023
1 parent b848c9d commit 2a2fdaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion js/BoxMenuGroupView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class BoxMenuGroupView extends MenuItemView {
}

updateItemCount() {
const models = this.model.getChildren().models;
const models = this.model.getChildren().where({
_isHidden: false
});
const totalChildren = models.length;
models.forEach(model => model.set('_totalChild', totalChildren));
}
Expand Down
1 change: 0 additions & 1 deletion js/BoxMenuView.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class BoxMenuView extends MenuView {
let nthChild = 0;
const models = this.model.getChildren().models;
const totalChild = this.model.getChildren().where({
_isAvailable: true,
_isHidden: false
}).length;

Expand Down

0 comments on commit 2a2fdaa

Please sign in to comment.