Fix account select showing cuid instead of name in transaction filters
This commit is contained in:
@@ -52,7 +52,9 @@ export function TransactionFilters({ accounts }: { accounts: AccountOption[] })
|
|||||||
<Label className="text-xs">Account</Label>
|
<Label className="text-xs">Account</Label>
|
||||||
<Select value={sp('accountId')} onValueChange={(v) => push({ accountId: v ?? '' })}>
|
<Select value={sp('accountId')} onValueChange={(v) => push({ accountId: v ?? '' })}>
|
||||||
<SelectTrigger className="h-8 w-44 text-sm">
|
<SelectTrigger className="h-8 w-44 text-sm">
|
||||||
<SelectValue placeholder="All accounts" />
|
<SelectValue placeholder="All accounts">
|
||||||
|
{accounts.find((a) => a.id === sp('accountId'))?.name ?? 'All accounts'}
|
||||||
|
</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="">All accounts</SelectItem>
|
<SelectItem value="">All accounts</SelectItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user