@applica-software-guru/react-admin 1.3.147 → 1.3.149

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": "@applica-software-guru/react-admin",
3
- "version": "1.3.147",
3
+ "version": "1.3.149",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,7 +51,9 @@ const ActionsMenu = ({ horizontal = false, children }: ActionsMenuProps): React.
51
51
  e.preventDefault();
52
52
  setOpen(e.currentTarget);
53
53
  };
54
- const handleClose = useCallback(() => {
54
+ const handleClose = useCallback((e: any) => {
55
+ e.stopPropagation();
56
+ e.preventDefault();
55
57
  setOpen(null);
56
58
  }, []);
57
59
 
@@ -2,7 +2,6 @@ import { CloneButton, DeleteWithConfirmButton, EditButton } from 'react-admin';
2
2
 
3
3
  import ActionsMenu from '../ActionsMenu';
4
4
  import PropTypes from 'prop-types';
5
- import React from 'react';
6
5
 
7
6
  const ActionsField = ({ canEdit, canDelete, canClone }) => {
8
7
  if (!canEdit && !canDelete && !canClone) {
@@ -58,10 +58,13 @@ function BaseItem(props: IBaseItemProps) {
58
58
  badge: badge,
59
59
  errors: errorsCount
60
60
  });
61
+ }, [addItem, removeItem, label, icon, id, badge, index, errorsCount]);
62
+
63
+ useEffect(() => {
61
64
  return () => {
62
65
  removeItem(id);
63
66
  };
64
- }, [addItem, removeItem, label, icon, id, badge, index, errorsCount]);
67
+ }, [id]);
65
68
 
66
69
  /* All tabs are rendered (not only the one in focus), to allow validation
67
70
  on tabs not in focus. The tabs receive a `hidden` property, which they'll