@applica-software-guru/react-admin 1.5.340 → 1.5.342

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
@@ -108,5 +108,5 @@
108
108
  "type": "module",
109
109
  "types": "dist/index.d.ts",
110
110
  "typings": "dist/index.d.ts",
111
- "version": "1.5.340"
111
+ "version": "1.5.342"
112
112
  }
@@ -30,7 +30,7 @@ const StyledMenuPopover = styled(MenuPopover, {
30
30
  }
31
31
  }));
32
32
 
33
- type ActionsMenuProps = PropsWithChildren<{ horizontal?: boolean }>;
33
+ type ActionsMenuProps = PropsWithChildren<{ horizontal?: boolean; disabled?: boolean }>;
34
34
 
35
35
  /**
36
36
  * Allows you to draw a menu of actions grouped within a popover.
@@ -42,7 +42,7 @@ type ActionsMenuProps = PropsWithChildren<{ horizontal?: boolean }>;
42
42
  * <EditButton />
43
43
  * </ActionsMenu>
44
44
  */
45
- function ActionsMenu({ horizontal = false, children }: ActionsMenuProps): React.ReactElement | null {
45
+ function ActionsMenu({ horizontal = false, disabled = false, children }: ActionsMenuProps): React.ReactElement | null {
46
46
  const [open, setOpen] = useState(null);
47
47
  const actionRef = React.useRef(null);
48
48
 
@@ -75,7 +75,13 @@ function ActionsMenu({ horizontal = false, children }: ActionsMenuProps): React.
75
75
 
76
76
  return (
77
77
  <StyledRoot>
78
- <IconButton aria-label="more" aria-haspopup="true" onClick={handleClick} color={open ? 'inherit' : 'default'}>
78
+ <IconButton
79
+ aria-label="more"
80
+ aria-haspopup="true"
81
+ onClick={handleClick}
82
+ color={open ? 'inherit' : 'default'}
83
+ disabled={disabled}
84
+ >
79
85
  {horizontal ? <MoreHoriz /> : <MoreVert />}
80
86
  </IconButton>
81
87
  {/* @ts-ignore */}
@@ -1,6 +1,6 @@
1
1
  import { BulkActionsToolbar } from '@/components/ra-lists/BulkActionsToolbar';
2
2
  import { DatagridContextProvider } from '@/components/ra-lists/Datagrid/DatagridContextProvider';
3
- import { Table, Typography } from '@mui/material';
3
+ import { Table } from '@mui/material';
4
4
  import clsx from 'clsx';
5
5
  import difference from 'lodash/difference';
6
6
  import union from 'lodash/union';
@@ -168,12 +168,9 @@ const Datagrid = React.forwardRef((props, ref) => {
168
168
 
169
169
  const DefaultEmpty = (
170
170
  <Empty
171
+ hasCreate={false}
171
172
  sx={{ '& .ApplicaEmpty-icon': { fontSize: '7em' } }}
172
- title={
173
- <Typography variant="subtitle1" style={{ color: 'inherit' }} gutterBottom>
174
- {translate('ra.navigation.no_results')}
175
- </Typography>
176
- }
173
+ title={translate('ra.navigation.no_results')}
177
174
  />
178
175
  );
179
176