mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Fix loading state for flag and sub-flag dropdowns
This commit is contained in:
@@ -491,7 +491,7 @@ const ProductForm = ({ type = 'add', initialValues }: ProductFormProps) => {
|
|||||||
formik.setFieldValue('sub_flags', []);
|
formik.setFieldValue('sub_flags', []);
|
||||||
}}
|
}}
|
||||||
options={productFlagMapping?.flags ?? []}
|
options={productFlagMapping?.flags ?? []}
|
||||||
isLoading={isLoadingConstants}
|
isLoading={isLoadingConstants && !productFlagMapping}
|
||||||
isError={formik.touched.flag && Boolean(formik.errors.flag)}
|
isError={formik.touched.flag && Boolean(formik.errors.flag)}
|
||||||
errorMessage={formik.errors.flag as string}
|
errorMessage={formik.errors.flag as string}
|
||||||
isDisabled={type === 'detail'}
|
isDisabled={type === 'detail'}
|
||||||
@@ -512,7 +512,7 @@ const ProductForm = ({ type = 'add', initialValues }: ProductFormProps) => {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
options={subFlagOptions}
|
options={subFlagOptions}
|
||||||
isLoading={isLoadingConstants}
|
isLoading={isLoadingConstants && !productFlagMapping}
|
||||||
isError={
|
isError={
|
||||||
formik.touched.sub_flags && Boolean(formik.errors.sub_flags)
|
formik.touched.sub_flags && Boolean(formik.errors.sub_flags)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user