Skip to content

Commit

Permalink
Merge pull request #52974 from twilight2294/patch-8
Browse files Browse the repository at this point in the history
Fix: Selected Xero bank account is not highlighted with a green checkmark
  • Loading branch information
justinpersaud authored Nov 25, 2024
2 parents 9c07d81 + 71d18bd commit ba65563
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ function XeroBankAccountSelectPage({policy}: WithPolicyConnectionsProps) {
const policyID = policy?.id ?? '-1';

const {config} = policy?.connections?.xero ?? {};
const {bankAccounts} = policy?.connections?.xero?.data ?? {};
const xeroSelectorOptions = useMemo<SelectorType[]>(
() => getXeroBankAccounts(policy ?? undefined, config?.export?.nonReimbursableAccount),
[config?.export?.nonReimbursableAccount, policy],
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
() => getXeroBankAccounts(policy ?? undefined, config?.export?.nonReimbursableAccount || bankAccounts?.[0]?.id),
[config?.export?.nonReimbursableAccount, policy, bankAccounts],
);

const listHeaderComponent = useMemo(
Expand Down

0 comments on commit ba65563

Please sign in to comment.