mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fixes
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user