react-crud-mobile 1.3.85 → 1.3.86
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.
- package/dist/react-crud-mobile.cjs.development.js +36 -34
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +36 -34
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +35 -33
package/package.json
CHANGED
|
@@ -601,44 +601,46 @@ export default function UIElement(props: ElementType) {
|
|
|
601
601
|
};
|
|
602
602
|
|
|
603
603
|
scope.dialogOpen = (args?: MethodType) => {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
604
|
+
if (!dialog) {
|
|
605
|
+
let { crud, event } = args;
|
|
606
|
+
let name = scope.getName('modal');
|
|
607
|
+
let edit = args.edit === true;
|
|
608
|
+
let def: any = {};
|
|
609
|
+
let rowItem = null;
|
|
610
|
+
let main = ViewUtils.getCrud('view');
|
|
611
|
+
|
|
612
|
+
if (crud.is('row')) {
|
|
613
|
+
def.parent = crud.parent.parent;
|
|
614
|
+
def.search = crud.parent;
|
|
615
|
+
|
|
616
|
+
rowItem = crud.data;
|
|
617
|
+
} else if (crud.is('search')) {
|
|
618
|
+
def.parent = crud.parent;
|
|
619
|
+
def.search = crud;
|
|
620
|
+
}
|
|
620
621
|
|
|
621
|
-
|
|
622
|
-
|
|
622
|
+
let data = Utils.nvl(args.item, rowItem, {});
|
|
623
|
+
let component = event?.component;
|
|
623
624
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
625
|
+
if (component) {
|
|
626
|
+
let d = CrudUtils.create('dialog', {
|
|
627
|
+
parent: crud,
|
|
628
|
+
root: crud,
|
|
629
|
+
name,
|
|
630
|
+
dialog: main.dialog,
|
|
631
|
+
data,
|
|
632
|
+
edit,
|
|
633
|
+
scope,
|
|
634
|
+
...def,
|
|
635
|
+
});
|
|
635
636
|
|
|
636
|
-
|
|
637
|
+
main.dialog = d;
|
|
637
638
|
|
|
638
|
-
|
|
639
|
+
scope.currentDialog = d;
|
|
639
640
|
|
|
640
|
-
|
|
641
|
-
|
|
641
|
+
dialog = { component, crud: d };
|
|
642
|
+
setDialog(dialog);
|
|
643
|
+
}
|
|
642
644
|
}
|
|
643
645
|
};
|
|
644
646
|
|