This commit is contained in:
estifanos
2026-08-10 12:19:04 +00:00
parent 47884831b2
commit 2495cd4cb8

View File

@@ -11,6 +11,7 @@ import {
localized,
type FormSectionConfig,
} from '@ema-platform/api';
import { CountrySelect } from '@ema-platform/ui';
interface Props {
section: FormSectionConfig;
@@ -58,10 +59,19 @@ export function ConfigDrivenSection({
disabled: disabled || field.readOnly,
};
const span = field.type === 'TEXTAREA' ? 12 : 6;
// Same field the profile Address tab collects — give it the same
// searchable, flag-labeled picker instead of a plain option list.
const isNationality = field.key === 'nationality' || label.toLowerCase().includes('nationality');
return (
<Grid.Col span={{ base: 12, md: span }} key={field.key}>
{field.type === 'SELECT' ? (
{isNationality ? (
<CountrySelect
{...common}
value={(value as string) ?? null}
onChange={(v) => onChange(field.key, v)}
/>
) : field.type === 'SELECT' ? (
<Select
{...common}
data={(field.options ?? []).map((o) => ({