submit 'type' fixes
This commit is contained in:
parent
d331ca0e84
commit
667ecbf439
1 changed files with 6 additions and 1 deletions
|
|
@ -129,7 +129,12 @@ function useOptions(path: string) {
|
|||
child = rows.find((r: any) => r?.field === full);
|
||||
}
|
||||
|
||||
const choices: any[] = child?.meta?.options?.choices || [];
|
||||
// ⟵ PATCH: read choices from nested child.options.choices first, then meta.options.choices
|
||||
const choices: any[] =
|
||||
(child?.options?.choices as any[]) ||
|
||||
(child?.meta?.options?.choices as any[]) ||
|
||||
[];
|
||||
|
||||
const mapped: Opt[] = choices.map((c: any) => ({
|
||||
id: String(c.value ?? c.key ?? c.id),
|
||||
label: String(c.text ?? c.label ?? c.name ?? c.value),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue