@akanjs/ui 0.9.38 → 0.9.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,13 +63,15 @@ function ViewEditModal({
|
|
|
63
63
|
resetModel: `reset${ModelName}`,
|
|
64
64
|
editModel: `edit${ModelName}`,
|
|
65
65
|
submitModel: `submit${ModelName}`,
|
|
66
|
-
modelForm: `${modelName}Form
|
|
66
|
+
modelForm: `${modelName}Form`,
|
|
67
|
+
modelFormLoading: `${modelName}FormLoading`
|
|
67
68
|
};
|
|
68
69
|
const model = storeUse[names.model]();
|
|
69
70
|
const modelModal = storeUse[names.modelModal]();
|
|
70
71
|
const modelLoading = storeUse[names.modelLoading]();
|
|
72
|
+
const modelFormLoading = storeUse[names.modelFormLoading]();
|
|
71
73
|
const modelFormId = storeSel((state) => state[names.modelForm].id);
|
|
72
|
-
const isModalOpen = modelModal === "view" || modelModal === "edit" && !!modelFormId;
|
|
74
|
+
const isModalOpen = modelModal === "view" || modelModal === "edit" && (!!modelFormLoading || !!modelFormId);
|
|
73
75
|
const Title = () => {
|
|
74
76
|
if (!model || modelLoading || !renderTitle)
|
|
75
77
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
@@ -31,13 +31,15 @@ function ViewEditModal({
|
|
|
31
31
|
resetModel: `reset${ModelName}`,
|
|
32
32
|
editModel: `edit${ModelName}`,
|
|
33
33
|
submitModel: `submit${ModelName}`,
|
|
34
|
-
modelForm: `${modelName}Form
|
|
34
|
+
modelForm: `${modelName}Form`,
|
|
35
|
+
modelFormLoading: `${modelName}FormLoading`
|
|
35
36
|
};
|
|
36
37
|
const model = storeUse[names.model]();
|
|
37
38
|
const modelModal = storeUse[names.modelModal]();
|
|
38
39
|
const modelLoading = storeUse[names.modelLoading]();
|
|
40
|
+
const modelFormLoading = storeUse[names.modelFormLoading]();
|
|
39
41
|
const modelFormId = storeSel((state) => state[names.modelForm].id);
|
|
40
|
-
const isModalOpen = modelModal === "view" || modelModal === "edit" && !!modelFormId;
|
|
42
|
+
const isModalOpen = modelModal === "view" || modelModal === "edit" && (!!modelFormLoading || !!modelFormId);
|
|
41
43
|
const Title = () => {
|
|
42
44
|
if (!model || modelLoading || !renderTitle)
|
|
43
45
|
return /* @__PURE__ */ jsx(Fragment, {});
|