mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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 selectedSubtype = subtypeOption?.value as string;
|
||||
|
||||
formik.setFieldValue('transaction_subtype', selectedSubtype);
|
||||
formik.setFieldTouched('transaction_subtype', true);
|
||||
formik.setFieldValue('transaction_subtype', selectedSubtype);
|
||||
|
||||
setSelectedTransactionSubtype(subtypeOption);
|
||||
};
|
||||
@@ -748,7 +748,11 @@ const InventoryAdjustmentForm = ({
|
||||
readOnly={type === 'detail'}
|
||||
/>
|
||||
</div>
|
||||
<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'>
|
||||
{type !== 'detail' && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user