mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Update for updated version of autocomplete (fix labels undefined)
This commit is contained in:
@ -224,7 +224,17 @@ function DynamicSelect({tableName, fieldName, fieldLabel, inForm, initialValue,
|
|||||||
setOpen(false);
|
setOpen(false);
|
||||||
}}
|
}}
|
||||||
isOptionEqualToValue={(option, value) => option.id === value.id}
|
isOptionEqualToValue={(option, value) => option.id === value.id}
|
||||||
getOptionLabel={(option) => (option as QPossibleValue).label}
|
getOptionLabel={(option) =>
|
||||||
|
{
|
||||||
|
// @ts-ignore
|
||||||
|
if(option && option.length)
|
||||||
|
{
|
||||||
|
// @ts-ignore
|
||||||
|
option = option[0];
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
return option.label
|
||||||
|
}}
|
||||||
options={options}
|
options={options}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onInputChange={inputChanged}
|
onInputChange={inputChanged}
|
||||||
|
Reference in New Issue
Block a user