mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
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:
commit
bb901d9d7e
@ -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: (
|
||||||
|
Loading…
Reference in New Issue
Block a user