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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.85",
2
+ "version": "1.3.86",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -601,44 +601,46 @@ export default function UIElement(props: ElementType) {
601
601
  };
602
602
 
603
603
  scope.dialogOpen = (args?: MethodType) => {
604
- let { crud, event } = args;
605
- let name = scope.getName('modal');
606
- let edit = args.edit === true;
607
- let def: any = {};
608
- let rowItem = null;
609
- let main = ViewUtils.getCrud('view');
610
-
611
- if (crud.is('row')) {
612
- def.parent = crud.parent.parent;
613
- def.search = crud.parent;
614
-
615
- rowItem = crud.data;
616
- } else if (crud.is('search')) {
617
- def.parent = crud.parent;
618
- def.search = crud;
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
- let data = Utils.nvl(args.item, rowItem, {});
622
- let component = event?.component;
622
+ let data = Utils.nvl(args.item, rowItem, {});
623
+ let component = event?.component;
623
624
 
624
- if (component) {
625
- let d = CrudUtils.create('dialog', {
626
- parent: crud,
627
- root: crud,
628
- name,
629
- dialog: main.dialog,
630
- data,
631
- edit,
632
- scope,
633
- ...def,
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
- main.dialog = d;
637
+ main.dialog = d;
637
638
 
638
- scope.currentDialog = d;
639
+ scope.currentDialog = d;
639
640
 
640
- dialog = { component, crud: d };
641
- setDialog(dialog);
641
+ dialog = { component, crud: d };
642
+ setDialog(dialog);
643
+ }
642
644
  }
643
645
  };
644
646