react-crud-mobile 1.3.275 → 1.3.277

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,6 +1,6 @@
1
1
  {
2
2
  "name": "react-crud-mobile",
3
- "version": "1.3.275",
3
+ "version": "1.3.277",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native",
6
6
  "main": "dist/index.js",
@@ -705,29 +705,26 @@ export default function UIElement(props: ElementType) {
705
705
 
706
706
  scope.dialogHide = (args?: MethodType) => {
707
707
  let main = ViewUtils.getCrud('view');
708
- let old = scope.currentDialog;
709
- let parentScope = old.scope.parent as Scope;
708
+ let current = main.dialog;
709
+ let next = Utils.nvl(main.parent, null);
710
710
 
711
- main.dialog = Utils.nvl(old.parent, null);
712
- scope.currentDialog = null;
711
+ main.dialog = next;
712
+ scope.currentDialog = next;
713
713
 
714
- console.log(scope);
714
+ if (current?.scope) {
715
+ const close = current.close;
715
716
 
716
- if (main.dialog?.crud?.scope) {
717
- main.dialog?.crud.scope.update();
718
- }
719
- scope.update();
720
-
721
- if (parentScope) {
722
- const close = old.close;
723
-
724
- parentScope.update();
717
+ current.scope.update();
725
718
 
726
719
  if (close) {
727
720
  if (close?.debug) console.log('Fechando');
728
- parentScope.call('close', { close });
721
+ current.scope.call('close', { close });
729
722
  }
730
723
  }
724
+
725
+ if (next?.scope) {
726
+ next.scope.update();
727
+ }
731
728
  };
732
729
 
733
730
  return (