I'm having issue when passing props in the
GridActionsCellItem
in
'@mui/x-data-grid';
colums;
{
field: 'actions',
type: 'actions',
width: 80,
getActions: (params: any) => [
<GridActionsCellItem
icon={<DeleteIcon />}
label="Delete"
onClick={test(params.id)}
showInMenu
/>,
<GridActionsCellItem
icon={<DeleteIcon />}
label="Delete"
onClick={test(params.id)}
showInMenu
/>,
],
},
Error that im having
Type '{ icon: Element; label: string; onClick: () => void; showInMenu: true; }' is missing the following properties from type 'Pick<{ label: string; icon?: ReactElement<any, string | JSXElementConstructor> | undefined; } & { showInMenu: true; } & { autoFocus?: boolean | undefined; ... 6 more ...; sx?: SxProps<...> | undefined; } & Omit<...> & CommonProps & Omit<...>, "label" | ... 276 more ... | "divider">': nonce, onResize, onResizeCapture
i want to have empty colum with 3 dots that open a dropdown with some options.
The <GridActionsCellItem on @mui/x-data-grid version "5.17.12" has some problems. So switch to @mui/x-data-grid version 5.17.8. Everything works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With