From d9b1b70cd3776f1773657cc6d741cc053b8eecde Mon Sep 17 00:00:00 2001 From: Paul Sarando Date: Wed, 28 Feb 2024 20:09:04 -0700 Subject: [PATCH] CORE-1967 Fix warning for isDisabled in FormSearchField Probably broken by MUI v5 Autocomplete upgrade in #554 --- src/components/forms/FormSearchField.js | 2 ++ src/components/metadata/templates/index.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/forms/FormSearchField.js b/src/components/forms/FormSearchField.js index 2c8bfcc1f..78d3f79f6 100644 --- a/src/components/forms/FormSearchField.js +++ b/src/components/forms/FormSearchField.js @@ -18,6 +18,7 @@ const FormSearchField = ({ form: { setFieldValue, ...form }, valueKey, labelKey, + readOnly, ...props }) => { const [searchValue, setSearchValue] = React.useState(value); @@ -48,6 +49,7 @@ const FormSearchField = ({ return ( option[labelKey] === value[labelKey] } diff --git a/src/components/metadata/templates/index.js b/src/components/metadata/templates/index.js index 2a68a0010..34e8174de 100644 --- a/src/components/metadata/templates/index.js +++ b/src/components/metadata/templates/index.js @@ -241,7 +241,7 @@ const MetadataTemplateAttributeForm = (props) => { fieldProps = { ...fieldProps, searchAstroThesaurusTerms, - isDisabled: !writable, + readOnly: !writable, }; break; @@ -251,7 +251,7 @@ const MetadataTemplateAttributeForm = (props) => { ...fieldProps, searchOLSTerms, attribute, - isDisabled: !writable, + readOnly: !writable, }; break;