@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/dist/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Tab.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +172 -170
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionsMenu.tsx +3 -1
- package/src/components/ra-fields/ActionsField.jsx +0 -1
- package/src/components/ra-forms/LongForm/Tab.tsx +4 -1
package/package.json
CHANGED
|
@@ -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
|
-
}, [
|
|
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
|