Skip to content

Commit

Permalink
* menu: fix show no match hint without any search keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Jan 24, 2024
1 parent b8fa738 commit f4704ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/menu/src/component/search-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class SearchMenu<T extends SearchMenuOptions = SearchMenuOptions> extends
}
const $element = $(this.element);
$element.find('.item.is-nested.is-not-match').filter((_, element) => this._matchedParents.has(element.getAttribute('z-key-path') || '')).addClass('has-match-child');
$element.parent().toggleClass('no-match-child', !$element.children('.item').not('.is-not-match').length);
$element.parent().toggleClass('no-match-child', !!this._searchKeys?.length && !$element.children('.item').not('.is-not-match').length);
}

protected _handleSearchChange = (search: string) => {
Expand Down

0 comments on commit f4704ab

Please sign in to comment.