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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user