Skip to content

Migrate remaining components to forward their refs properly #4194

Closed
@bpas247

Description

@bpas247

Is your feature request related to a problem? Please describe

For examples on how to migrate these components, please read #4031, #4135, and #3992.

A clear and concise description of what the problem is.

Currently, not all of our components properly forward the passed in ref prop to the underlying component. This leads to end-users not being able to access the underlying DOM node (#3923 and #4012).

Describe the solution you'd like

Migrate the remaining class components to be ref forwarders. The components that need to be migrated are:
- [ ] Modal

Describe alternatives you've considered

So currently we have two different approaches of handling forwarding refs; per-component or through a HOC called createBootstrapComponent. I'm personally unsure about which approach to use for our codebase, but we should plan to choose one approach and stick with it for consistency. IMO we should handle this per-component, as using a HOC here might make the implementation of our codebase more complex than it's worth. This would involve migrating all of the components that use createBootstrapComponent, which some of them are included in the above list.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions