Skip to content

Commit

Permalink
rename expanded -> isExpanded
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalife committed Dec 11, 2024
1 parent d76b4af commit 7d2d319
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2105,9 +2105,9 @@ export const TransactionTable = forwardRef((props, ref) => {
result = props.transactions.filter((t, idx) => {
if (t.parent_id) {
if (idx >= index) {
return splitsExpanded.expanded(t.parent_id);
return splitsExpanded.isExpanded(t.parent_id);
} else if (prevSplitsExpanded.current) {
return prevSplitsExpanded.current.expanded(t.parent_id);
return prevSplitsExpanded.current.isExpanded(t.parent_id);
}
}
return true;
Expand All @@ -2124,7 +2124,7 @@ export const TransactionTable = forwardRef((props, ref) => {

result = props.transactions.filter(t => {
if (t.parent_id) {
return splitsExpanded.expanded(t.parent_id);
return splitsExpanded.isExpanded(t.parent_id);
}
return true;
});
Expand Down Expand Up @@ -2595,7 +2595,7 @@ export const TransactionTable = forwardRef((props, ref) => {
transactionsByParent={transactionsByParent}
transferAccountsByTransaction={transferAccountsByTransaction}
selectedItems={selectedItems}
isExpanded={splitsExpanded.expanded}
isExpanded={splitsExpanded.isExpanded}
onSave={onSave}
onDelete={onDelete}
onDuplicate={onDuplicate}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/hooks/useSplitsExpanded.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function useSplitsExpanded() {
return useMemo(
() => ({
...data,
expanded: (id: string) =>
isExpanded: (id: string) =>
data.state.mode === 'collapse'
? !data.state.ids.has(id)
: data.state.ids.has(id),
Expand Down

0 comments on commit 7d2d319

Please sign in to comment.