react-crud-mobile 1.3.530 → 1.3.531

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/index.js CHANGED
@@ -434,8 +434,10 @@ function UIButton(props) {
434
434
  flexDirection: "row"
435
435
  }
436
436
  };
437
- const onClick = (e) => {
438
- scope.call("click", {});
437
+ const onClick = async (e) => {
438
+ requestAnimationFrame(() => {
439
+ scope.call("click", {});
440
+ });
439
441
  };
440
442
  const style = (part, extra2) => {
441
443
  let css = { ...styles13[part], ...extra2 };
@@ -490,7 +492,7 @@ function UIButton(props) {
490
492
  return css;
491
493
  });
492
494
  scope.updaters.loader = (loading) => {
493
- setLoaderIndex(++loaderIndex);
495
+ setLoaderIndex((i) => i + 1);
494
496
  };
495
497
  let iconSize = import_react_crud_utils5.Utils.nvl(element.iconSize, buttonLabel.fontSize, 15);
496
498
  if (scope.loading) {
@@ -499,7 +501,7 @@ function UIButton(props) {
499
501
  label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Text, { style: buttonLabel, children: scope.lng("loading", "Aguarde...") })
500
502
  ] }) });
501
503
  }
502
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.TouchableHighlight, { underlayColor: "transparent", onPress: onClick, style: buttonStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
504
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Pressable, { onPress: onClick, style: buttonStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
503
505
  icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UI_default.Icon, { size: iconSize, style: iconStyle, value: icon }) }),
504
506
  label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Text, { style: buttonLabel, children: label })
505
507
  ] }) });