-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] Fix console warnings while executing tests with React 18 #16386
Conversation
1e2a914
to
7eed2d3
Compare
Deploy preview: https://deploy-preview-16386--material-ui-x.netlify.app/ |
It looks like there are other components, which need similar changes. 🤔 |
It didn't work, so I took another approach. |
null
reference as inputRef
prop@@ -18,7 +18,7 @@ export type GridFilterInputValueProps< | |||
applyValue: (value: GridFilterItem) => void; | |||
// Is any because if typed as GridApiRef a dep cycle occurs. Same happens if ApiContext is used. | |||
apiRef: RefObject<Api>; | |||
inputRef?: React.Ref<any>; | |||
inputRef?: React.Ref<HTMLElement | null>; | |||
focusElementRef?: React.Ref<any>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I do the same for focusElementRef
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it, but it requires a bit more changes than just this type, so I left it as any
if it is not super important, I would leave it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. 👍
This fixes the warning on React 18 that is breaking the tests
https://app.circleci.com/pipelines/github/mui/mui-x/79788/workflows/e0f5c399-0631-4b3e-a933-7581381b7d66
It does not need a cherry pick.
Before merge: