diff --git a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx index 99041a45872..9d23862b8e9 100644 --- a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx @@ -202,8 +202,7 @@ export default function CategoryAutocomplete({ return suggestions.filter(suggestion => { return ( suggestion.id === 'split' || - defaultFilterSuggestion(suggestion, value) || - suggestion.groupName.toLowerCase().includes(value.toLowerCase()) + defaultFilterSuggestion(suggestion, value) ); }); }} diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.test.js b/packages/desktop-client/src/components/transactions/TransactionsTable.test.js index b859327ccc4..27849cc6463 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.test.js +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.test.js @@ -448,17 +448,12 @@ describe('Transactions', () => { expect(items[1].textContent).toBe('General'); expect(items[1].dataset['testid']).toBe('category-item-highlighted'); - // It should also allow filtering on group names + // It should not allow filtering on group names await userEvent.clear(input); - await userEvent.type(input, 'Usual'); + await userEvent.type(input, 'Usual Expenses'); items = tooltip.querySelectorAll('[data-testid*="category-item"]'); - expect(items.length).toBe(4); - expect(items[0].textContent).toBe('Usual Expenses'); - expect(items[1].textContent).toBe('Food'); - expect(items[2].textContent).toBe('General'); - expect(items[3].textContent).toBe('Home'); - expect(items[1].dataset['testid']).toBe('category-item-highlighted'); + expect(items.length).toBe(0); }); test('dropdown selects an item with keyboard', async () => { diff --git a/upcoming-release-notes/1681.md b/upcoming-release-notes/1681.md new file mode 100644 index 00000000000..d04fc9a8ccd --- /dev/null +++ b/upcoming-release-notes/1681.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [shaankhosla] +--- + +Category autocomplete doesn't include unselectable category groups now \ No newline at end of file