Skip to content

Commit

Permalink
CORE-1967 Fix warning for isDisabled in FormSearchField
Browse files Browse the repository at this point in the history
Probably broken by MUI v5 Autocomplete upgrade in #554
  • Loading branch information
psarando committed Mar 4, 2024
1 parent 92639a1 commit d9b1b70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/forms/FormSearchField.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const FormSearchField = ({
form: { setFieldValue, ...form },
valueKey,
labelKey,
readOnly,
...props
}) => {
const [searchValue, setSearchValue] = React.useState(value);
Expand Down Expand Up @@ -48,6 +49,7 @@ const FormSearchField = ({
return (
<Autocomplete
id={id}
readOnly={readOnly}
isOptionEqualToValue={(option, value) =>
option[labelKey] === value[labelKey]
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/metadata/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const MetadataTemplateAttributeForm = (props) => {
fieldProps = {
...fieldProps,
searchAstroThesaurusTerms,
isDisabled: !writable,
readOnly: !writable,
};
break;

Expand All @@ -251,7 +251,7 @@ const MetadataTemplateAttributeForm = (props) => {
...fieldProps,
searchOLSTerms,
attribute,
isDisabled: !writable,
readOnly: !writable,
};
break;

Expand Down

0 comments on commit d9b1b70

Please sign in to comment.