From 68deba4b7b951a2d3d0c9e3cb30ddc9f6386c69c Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Mon, 15 Feb 2021 15:25:55 +0200 Subject: [PATCH] fix: Disable item type inventory in edit mode --- client/src/containers/Items/ItemFormPrimarySection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/containers/Items/ItemFormPrimarySection.js b/client/src/containers/Items/ItemFormPrimarySection.js index 621609ea8..531683b7c 100644 --- a/client/src/containers/Items/ItemFormPrimarySection.js +++ b/client/src/containers/Items/ItemFormPrimarySection.js @@ -31,7 +31,7 @@ export default function ItemFormPrimarySection() { const nameFieldRef = useRef(null); // Formik context. - const { values: { itemType } } = useFormikContext(); + const { values: { type } } = useFormikContext(); useEffect(() => { // Auto focus item name field once component mount. @@ -87,7 +87,7 @@ export default function ItemFormPrimarySection() { form.setFieldValue('type', _value); })} selectedValue={value} - disabled={itemType === 'inventory'} + disabled={type === 'inventory'} > } value="service" /> } value="non-inventory" />