mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

onResize and onResizeCapture error in GridActionsCellItem

Open karolis-666 opened this issue 2 years ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Steps to reproduce 🕹

Steps:

  1. Import <GridActionsCellItem /> from "@mui/x-data-grid-pro"
  2. Use <GridActionsCellItem />

Current behavior 😯

Component <GridActionsCellItem /> raises TS error, that props onResize, onResizeCapture and nonce are not provided. Proving them with values undefined raises erros in browser and our build.

Expected behavior 🤔

No TS error when not using these props

Context 🔦

Seems that this issue was fixed https://github.com/mui/material-ui/issues/35287 only for <Popper />, but not for <GridActionsCellItem /> as we also encountered issues with <Popper /> that are now fixed

Your environment 🌎

"@mui/base": "^5.0.0-alpha.90",
"@mui/icons-material": "^5.8.4",
"@mui/lab": "^5.0.0-alpha.86",
"@mui/material": "^5.11.10",
"@mui/styles": "^5.8.4",
"@mui/system": "^5.8.4",
"@mui/x-data-grid": "^5.12.2",
"@mui/x-data-grid-premium": "^5.17.24",
"@mui/x-data-grid-pro": "^5.17.24",
"@mui/x-date-pickers-pro": "^5.0.0-alpha.7",
"@mui/x-license-pro": "^5.13.1",
"@types/react": "^17.0.47",
"react": "^17.0.2",

Order ID 💳 (optional)

46744

karolis-666 avatar Feb 22 '23 13:02 karolis-666

I added it to our backlog.

m4theushw avatar Feb 22 '23 17:02 m4theushw

This same issue appears to be on the components GridPagination and GridToolbarDensitySelector

bagoette avatar Mar 28 '23 21:03 bagoette

This issue also appears with GridToolbarColumnsButton

jacksonlauder avatar Apr 04 '23 22:04 jacksonlauder

Can anyone provide a reproduction example for this issue? I tried to reproduce it using react@17 and @types/react@17, but don't see any errors here: https://codesandbox.io/s/nifty-rosalind-xvxju4?file=/index.tsx

cherniavskii avatar Apr 07 '23 11:04 cherniavskii

Codesandbox can't find @mui/x-data-grid-premium package, but here is link anyways: https://codesandbox.io/s/admiring-yalow-76xglk?file=/index.tsx

Issue can be seen using premium or pro package

karolis-666 avatar Apr 07 '23 12:04 karolis-666

@karolis-666 I've forked your sandbox, installed @mui/x-data-grid-premium, but there are no TS errors: https://codesandbox.io/s/confident-hooks-50b6jh?file=/index.tsx

Screenshot 2023-04-07 at 16 42 39

Same in my local project with the same setup:

Screenshot 2023-04-07 at 16 47 31

We need a reproduction to take an action on it. Can you setup a repo with a reproduction example maybe?

cherniavskii avatar Apr 07 '23 14:04 cherniavskii

I setup repo, but while setting it up encountered other TS errors with same component in question. Link: https://github.com/karolis-666/mui-1

karolis-666 avatar Apr 11 '23 13:04 karolis-666

Thanks @karolis-666 I forked your repo and removed some unnecessary dependencies. I can definitely reproduce the issue: Screenshot 2023-04-11 at 19 20 54


Then I tried upgrading the data grid to v6 and pushed it to a separate branch: https://github.com/cherniavskii/mui-1/tree/v6 And v6 works fine in the same setup:

Screenshot 2023-04-11 at 19 23 55

Could you try reproducing it using data grid v6 in https://github.com/cherniavskii/mui-1/tree/v6?

cherniavskii avatar Apr 11 '23 17:04 cherniavskii

In v6 I can't reproduced it so it seems solved. Unfortunately v6 is still in pre-release phase and experienced other issues with useGridApiContext hook so we can't upgrade to that version yet.

karolis-666 avatar Apr 17 '23 07:04 karolis-666

Hi @karolis-666 Sorry for the late reply! The v6 stable was released in early March https://github.com/mui/mui-x/releases/tag/v6.0.0 This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.

cherniavskii avatar Apr 28 '23 15:04 cherniavskii

Since the issue is solved in v6, I'm going to close this issue as there's no action to be taken on our end.

cherniavskii avatar Apr 28 '23 15:04 cherniavskii

I am using version 5 and I can't upgrade, can we do a bug fix for v5?

nouman91 avatar May 30 '23 22:05 nouman91