Merge pull request #1113 from Hexastack/1112-bug---some-labels-do-not-show-up-anymore

fix(frontend): resolve label updates
This commit is contained in:
Med Marrouchi 2025-06-09 11:19:19 +01:00 committed by GitHub
commit bb901d9d7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,12 +52,15 @@ const AutoCompleteSelect = <
FreeSolo extends boolean | undefined = false, FreeSolo extends boolean | undefined = false,
>( >(
{ {
label,
value, value,
options = [], options = [],
idKey = "id", idKey = "id",
labelKey, labelKey,
multiple, multiple,
onSearch, onSearch,
error,
helperText,
isOptionEqualToValue = (option, value) => isOptionEqualToValue = (option, value) =>
option?.[idKey] === value?.[idKey], option?.[idKey] === value?.[idKey],
getOptionLabel = (option) => option?.[String(labelKey)] || option?.[idKey], getOptionLabel = (option) => option?.[String(labelKey)] || option?.[idKey],
@ -154,7 +157,10 @@ const AutoCompleteSelect = <
renderInput={(props) => ( renderInput={(props) => (
<Input <Input
{...props} {...props}
label={label}
onChange={(e) => handleSearch(e.target.value)} onChange={(e) => handleSearch(e.target.value)}
error={error}
helperText={helperText}
InputProps={{ InputProps={{
...props.InputProps, ...props.InputProps,
endAdornment: ( endAdornment: (