-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Remove function export wrappers #15498
Comments
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team. |
Hello, This problem prevents us from fixing an accessibility defect : our OverflowMenu has items that open a modal, and when we close the modal, there is no way to get focus back on the overflow menu button since we can't get |
Hello @tay1orjones ! Any news on this work item ? Thanks. |
Hello @sstrubberg @tay1orjones I am re-reviewing our AVT issues and dependencies. Any news on this one ? Thanks. |
We have it queued up in our "Next" pipeline, which means it's made the cut for something we're very interested in doing soon while at the same time competing with other priorities. Can you tell us more about how this effects your AVT issues and dependencies? |
Hello @sstrubberg, our main issue with wrappers is that DOM (or components) references are not usable anymore, which prevents us from fixing some AVT defects around navigation (can't restore focus for example). |
As part of v11, many components were upgraded from class components to function components, #9712.
When v11 was close to being released, there were a handful of components that were not upgraded and instead a
createClassWrapper
helper was added that would wrap these components with a functional export - #10281.The problem
One downside with this approach is that users can no longer place a ref on these components (example). One workaround is to bypass the functional wrapper by importing the root class-based component. For example:
The solution
The remaining components using
createClassWrapper
need to be refactored to be functional components. This technically is a breaking change. We could place these changes behind a feature flag(s) to avoid the breaking change until our next major (v12)Tasks
The text was updated successfully, but these errors were encountered: