@flywheel-io/vision 21.5.0 → 21.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3508,11 +3508,11 @@ class FwMenuContainerComponent {
|
|
|
3508
3508
|
this.keyHandler = input(undefined, ...(ngDevMode ? [{ debugName: "keyHandler" }] : /* istanbul ignore next */ []));
|
|
3509
3509
|
effect(() => {
|
|
3510
3510
|
const filter = this.filterText();
|
|
3511
|
+
// combinedMenuItems() is read here (rather than only inside onFilterChange) so this effect
|
|
3512
|
+
// re-runs once contentChildren resolves, which happens a beat later than initial render
|
|
3513
|
+
// when this component is rendered inside a CdkMenuTrigger/CDK-overlay-portaled template.
|
|
3514
|
+
this.combinedMenuItems();
|
|
3511
3515
|
untracked(() => this.onFilterChange(filter));
|
|
3512
|
-
const allMenuItems = this.combinedMenuItems();
|
|
3513
|
-
allMenuItems.forEach((menuItem) => {
|
|
3514
|
-
menuItem.hidden.set(!this.filteredMenuItems.includes(menuItem));
|
|
3515
|
-
});
|
|
3516
3516
|
});
|
|
3517
3517
|
}
|
|
3518
3518
|
ngAfterViewInit() {
|
|
@@ -3572,6 +3572,9 @@ class FwMenuContainerComponent {
|
|
|
3572
3572
|
this.filterChanged.emit(filter);
|
|
3573
3573
|
const filterFn = this.filterFn();
|
|
3574
3574
|
this.filteredMenuItems = filterFn(filter, allMenuItems);
|
|
3575
|
+
allMenuItems.forEach((menuItem) => {
|
|
3576
|
+
menuItem.hidden.set(!this.filteredMenuItems.includes(menuItem));
|
|
3577
|
+
});
|
|
3575
3578
|
// Hide separators whenever a filter is active
|
|
3576
3579
|
const isFiltering = Boolean(filter && filter.trim() !== '');
|
|
3577
3580
|
[...this.childSeparators(), ...this.additionalSeparators()].forEach((separator) => {
|