Missing ref in functional components #119
diegofiore83
started this conversation in
General
Replies: 1 comment
-
This should be included now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
👋 Hello 👋
I noticed that latest version of the library export functional components instead of class component. With this change the ref passed become undefined and solutions like the following are not anymore possible.
<MTableToolbar {...props} ref={toolbarRef} />
toolbarRef.current.onSearchChange(search);
Maybe considering something like this for future release could repristinate that functionality: https://levelup.gitconnected.com/react-refs-for-function-components-44f1a5a2332a
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions