fix: show account name in upload select after selection
Base UI Select.Value renders the raw value prop (cuid) rather than the item label. Pass the looked-up account name as children to override it. Falls back to placeholder when no account matches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,9 @@ export function UploadForm({ accounts }: Props) {
|
|||||||
) : (
|
) : (
|
||||||
<Select value={accountId} onValueChange={(v) => setAccountId(v ?? '')}>
|
<Select value={accountId} onValueChange={(v) => setAccountId(v ?? '')}>
|
||||||
<SelectTrigger id="account" className="w-72">
|
<SelectTrigger id="account" className="w-72">
|
||||||
<SelectValue placeholder="Select account" />
|
<SelectValue placeholder="Select account">
|
||||||
|
{accounts.find((a) => a.id === accountId)?.name}
|
||||||
|
</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
{accounts.map((a) => (
|
{accounts.map((a) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user