mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +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', []);
|
||||
}}
|
||||
options={productFlagMapping?.flags ?? []}
|
||||
isLoading={isLoadingConstants}
|
||||
isLoading={isLoadingConstants && !productFlagMapping}
|
||||
isError={formik.touched.flag && Boolean(formik.errors.flag)}
|
||||
errorMessage={formik.errors.flag as string}
|
||||
isDisabled={type === 'detail'}
|
||||
@@ -512,7 +512,7 @@ const ProductForm = ({ type = 'add', initialValues }: ProductFormProps) => {
|
||||
);
|
||||
}}
|
||||
options={subFlagOptions}
|
||||
isLoading={isLoadingConstants}
|
||||
isLoading={isLoadingConstants && !productFlagMapping}
|
||||
isError={
|
||||
formik.touched.sub_flags && Boolean(formik.errors.sub_flags)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user