gomtm 0.0.319 → 0.0.320
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.
|
@@ -10,12 +10,15 @@ function CurdEditPanel(props) {
|
|
|
10
10
|
const setOpenEdit = useListview((x) => x.setOpenEdit);
|
|
11
11
|
const openEdit = useListview((x) => x.openEdit);
|
|
12
12
|
const editRender = useListview((x) => x.editRender);
|
|
13
|
+
if (!openEdit) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
13
16
|
if (fullScreen) {
|
|
14
|
-
return /* @__PURE__ */ jsx(FullScreenPanel, { children: editRender && flexRender(editRender, {}) });
|
|
17
|
+
return /* @__PURE__ */ jsx(FullScreenPanel, { children: openEdit && editRender && flexRender(editRender, {}) });
|
|
15
18
|
}
|
|
16
19
|
return /* @__PURE__ */ jsx(Dialog, { open: openEdit, onOpenChange: setOpenEdit, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
17
20
|
/* @__PURE__ */ jsx(DialogTitle, { children: " Edit " }),
|
|
18
|
-
editRender && flexRender(editRender, {}),
|
|
21
|
+
openEdit && editRender && flexRender(editRender, {}),
|
|
19
22
|
/* @__PURE__ */ jsx(MtButton, { onClick: () => {
|
|
20
23
|
console.log("editRender", editRender);
|
|
21
24
|
}, children: "xxxxx" })
|
|
@@ -23,7 +26,6 @@ function CurdEditPanel(props) {
|
|
|
23
26
|
}
|
|
24
27
|
const CurdEditPanelTriggerButton = () => {
|
|
25
28
|
const setOpenEdit = useListview((x) => x.setOpenEdit);
|
|
26
|
-
const openEdit = useListview((x) => x.openEdit);
|
|
27
29
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
|
|
28
30
|
setOpenEdit(true);
|
|
29
31
|
}, children: "Edit" }) });
|