Open tay1orjones opened 6 months ago
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
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 ref
.
The workaround doesn't work either for us because we use bx--
prefix which we can't set by importing the component directly.
As part of v11, many components were upgraded from class components to function components, https://github.com/carbon-design-system/carbon/issues/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 - https://github.com/carbon-design-system/carbon/issues/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)