1
0

fix(currency): use currency_code instead of id in CurrencySelectList

The CurrencySelectList component was using 'id' as the valueAccessor,
which caused the component to return the numeric currency ID (e.g., 1007)
instead of the currency code string (e.g., 'THB').

This fix changes the valueAccessor from 'id' to 'currency_code' so that
the currency code string is correctly sent to the backend, which expects
@IsString() for the currencyCode field.

Fixes #1025
This commit is contained in:
Ahmed Bouhuolia
2026-03-07 20:35:00 +02:00
parent 6d1e93e84b
commit 806b1c374f
@@ -19,7 +19,7 @@ export function CurrencySelectList({
name={name}
items={items}
textAccessor={'currency_code'}
valueAccessor={'id'}
valueAccessor={'currency_code'}
placeholder={placeholder}
popoverProps={{ minimal: true, usePortal: true, inline: false }}
{...props}