mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Fix form error list visibility and field touch handling
This commit is contained in:
@@ -412,8 +412,8 @@ const InventoryAdjustmentForm = ({
|
|||||||
const subtypeOption = val as OptionType | null;
|
const subtypeOption = val as OptionType | null;
|
||||||
const selectedSubtype = subtypeOption?.value as string;
|
const selectedSubtype = subtypeOption?.value as string;
|
||||||
|
|
||||||
formik.setFieldValue('transaction_subtype', selectedSubtype);
|
|
||||||
formik.setFieldTouched('transaction_subtype', true);
|
formik.setFieldTouched('transaction_subtype', true);
|
||||||
|
formik.setFieldValue('transaction_subtype', selectedSubtype);
|
||||||
|
|
||||||
setSelectedTransactionSubtype(subtypeOption);
|
setSelectedTransactionSubtype(subtypeOption);
|
||||||
};
|
};
|
||||||
@@ -748,7 +748,11 @@ const InventoryAdjustmentForm = ({
|
|||||||
readOnly={type === 'detail'}
|
readOnly={type === 'detail'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
<section
|
||||||
|
className={`${formErrorList.length > 0 ? 'block' : 'hidden'} mt-4`}
|
||||||
|
>
|
||||||
|
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
||||||
|
</section>
|
||||||
<div className='flex flex-col sm:flex-row sm:justify-end gap-2 mt-4'>
|
<div className='flex flex-col sm:flex-row sm:justify-end gap-2 mt-4'>
|
||||||
{type !== 'detail' && (
|
{type !== 'detail' && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user