react-crud-mobile 1.3.274 → 1.3.276

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.274",
3
+ "version": "1.3.276",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native",
6
6
  "main": "dist/index.js",
@@ -46,7 +46,7 @@
46
46
  "@react-native-vector-icons/material-icons": "^0.0.1",
47
47
  "expo-status-bar": "~3.0.8",
48
48
  "react": "19.1.0",
49
- "react-crud-utils": "^0.1.432",
49
+ "react-crud-utils": "^0.1.433",
50
50
  "react-dom": "19.1.0",
51
51
  "react-native": "0.81.4",
52
52
  "react-native-draggable-flatlist": "^4.0.3",
@@ -674,7 +674,9 @@ export default function UIElement(props: ElementType) {
674
674
  if (event.label) el.label = event.label;
675
675
  if (event.title) el.title = event.title;
676
676
 
677
- el.label = Utils.nvl(el.title, el.label);
677
+ let label = Utils.nvl(el.title, el.label);
678
+
679
+ el.label = label;
678
680
 
679
681
  let dialogScope = ScopeUtils.create({
680
682
  parent: scope,
@@ -685,6 +687,7 @@ export default function UIElement(props: ElementType) {
685
687
 
686
688
  let dialog = {
687
689
  crud: d,
690
+ label,
688
691
  parent,
689
692
  component,
690
693
  scope: dialogScope,
@@ -702,29 +705,30 @@ export default function UIElement(props: ElementType) {
702
705
 
703
706
  scope.dialogHide = (args?: MethodType) => {
704
707
  let main = ViewUtils.getCrud('view');
705
- let old = scope.currentDialog;
706
- let parentScope = old.scope.parent as Scope;
707
-
708
- main.dialog = Utils.nvl(old.parent, null);
709
- scope.currentDialog = null;
708
+ let current = main.dialog;
709
+ let next = Utils.nvl(main.parent, null);
710
710
 
711
- console.log(scope);
711
+ main.dialog = next;
712
+ scope.currentDialog = next;
712
713
 
713
714
  if (main.dialog?.crud?.scope) {
714
715
  main.dialog?.crud.scope.update();
715
716
  }
716
- scope.update();
717
717
 
718
- if (parentScope) {
719
- const close = old.close;
718
+ if (current?.scope) {
719
+ const close = current.close;
720
720
 
721
- parentScope.update();
721
+ current.scope.update();
722
722
 
723
723
  if (close) {
724
724
  if (close?.debug) console.log('Fechando');
725
- parentScope.call('close', { close });
725
+ current.scope.call('close', { close });
726
726
  }
727
727
  }
728
+
729
+ if (next.scope.update()) {
730
+ next.scope.update();
731
+ }
728
732
  };
729
733
 
730
734
  return (