Skip to content

Commit e6cdf74

Browse files
authored
DEV: uses autoPlacement for filter-navigation-menu (#34144)
This should prevent the content to be positioned above the input when there's only one result to show.
1 parent 21e5a73 commit e6cdf74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/assets/javascripts/discourse/app/components/discovery/filter-navigation-menu.gjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { bind } from "discourse/lib/decorators";
1919
import FilterSuggestions from "discourse/lib/filter-suggestions";
2020
import { resettableTracked } from "discourse/lib/tracked-tools";
2121
import { i18n } from "discourse-i18n";
22+
import { VISIBILITY_OPTIMIZERS } from "float-kit/lib/constants";
2223

2324
const MAX_RESULTS = 20;
2425

@@ -400,6 +401,7 @@ export default class FilterNavigationMenu extends Component {
400401
component: FilterNavigationMenuList,
401402
data: this.trackedMenuListData,
402403
maxWidth: 2000,
404+
visibilityOptimizer: VISIBILITY_OPTIMIZERS.AUTO_PLACEMENT,
403405
});
404406

405407
// HACK: We don't have a nice way for DMenu to be the same width as

0 commit comments

Comments
 (0)