From 6666014fe518f39d822245330adb4a4d9fcb467f Mon Sep 17 00:00:00 2001 From: Julian Dominguez-Schatz Date: Sat, 2 Nov 2024 16:09:17 -0400 Subject: [PATCH] Fix bugs in payee table (#3768) --- .../desktop-client/src/components/payees/PayeeTable.tsx | 9 ++++++++- .../src/components/payees/PayeeTableRow.tsx | 3 +++ upcoming-release-notes/3768.md | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/3768.md diff --git a/packages/desktop-client/src/components/payees/PayeeTable.tsx b/packages/desktop-client/src/components/payees/PayeeTable.tsx index 08542439935..b23cdbf490a 100644 --- a/packages/desktop-client/src/components/payees/PayeeTable.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTable.tsx @@ -12,7 +12,7 @@ import { type PayeeEntity } from 'loot-core/src/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; import { View } from '../common/View'; -import { Table } from '../table'; +import { useTableNavigator, Table } from '../table'; import { PayeeTableRow } from './PayeeTableRow'; @@ -46,9 +46,16 @@ export const PayeeTable = forwardRef< setHovered(id); }, []); + const tableNavigator = useTableNavigator(payees, item => + item.transfer_acct == null + ? ['select', 'name', 'rule-count'] + : ['rule-count'], + ); + return ( setHovered(null)}> { diff --git a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx index 4bdd60b1758..b0464a2bc9d 100644 --- a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx @@ -133,6 +133,9 @@ export const PayeeTableRow = memo( focused={focusedField === 'select'} selected={selected} onSelect={e => { + if (payee.transfer_acct != null) { + return; + } dispatchSelected({ type: 'select', id: payee.id, diff --git a/upcoming-release-notes/3768.md b/upcoming-release-notes/3768.md new file mode 100644 index 00000000000..98eafad6c92 --- /dev/null +++ b/upcoming-release-notes/3768.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jfdoming] +--- + +Fix bugs on payee management page