Skip to content

Commit

Permalink
fix(quick-search): Quick Search Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadaziz committed Aug 23, 2024
1 parent 13214bb commit 3f258be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/table/__tests__/makeSelectable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ describe('components/table/makeSelectable', () => {
wrapper.setState({ focusedIndex: undefined });
const instance = wrapper.instance();
const shortcut = instance.getHotkeyConfigs().find(h => h.get('key') === hotKey);
const event = { target: { dataset: { [datasetKey]: true } } };
const event = { target: { dataset: { [datasetKey]: true }, className: '' } };
shortcut.handler(event);
expect(wrapper.state('focusedIndex')).toEqual(undefined);
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/table/makeSelectable.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ function makeSelectable(BaseTable) {
// QuickSearch result, recent items and Quick Filters
isTargetQuickSearch = event =>
(event.target?.className &&
(event.target.className.contains('quickSearchRecentItem') ||
event.target.className.contains('quickSearchResultItem'))) ||
(event.target.className?.contains('quickSearchRecentItem') ||
event.target.className?.contains('quickSearchResultItem'))) ||
(event.target?.dataset &&
('radixCollectionItem' in event.target.dataset || 'bpSmallListItem' in event.target.dataset));

Expand Down

0 comments on commit 3f258be

Please sign in to comment.