-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Migrate remaining components to forward their refs properly #4194
Comments
Migrates Image and ProgressBar components to forward their refs properly. Relevant to #4194.
Took up DropdownToggle and the PR is #4690 |
[#4194] - ref forwarding for ToggleButton
Can I take on the |
Yep @ankurkaushal! Thank you :) |
@mxschmitt Any component remaining to be migrated ? |
I removed Collapse and OverlayTrigger from the list above; they shouldn't actually forward, given that they're wrapping containers. |
Should we even migrate the Modal component? It just seems like a very costly migration, and I'm not sure if there's a lot of value we can get out of it. |
hmm, arguably not... what would the ref even be to? |
Good question, I'm not sure if it would be a reference to anything useful. I'm going to go ahead and cross that out from the list, which would mark this issue as complete 🎉 Thank you to everyone who contributed their time for this major migration 😄 all of your continuing support is what makes this library as great as it is! |
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:
- [ ] ModalDescribe 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.The text was updated successfully, but these errors were encountered: