You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Create default ref for Startdust components that should point to the first DOM Element in the renderComponent.
Problem description
While developing the Dropdown component and using other Stardust components, I've used Input and List and had to manually expose refs for those components in order to use them in the Dropdown implementation (input focus, list passed to Downshift).
Proposed solution
A default ref prop should be added for each component probably in the renderComponent and initialised with the first DOMElement from the render function. (the List should've had the ElementType <ul>).
This ref prop should also be easy to override in case we want custom behaviour.
This default ref prop should not impact the addition of other ref-like props. For instance, in Input, we can still have the inputRef pointing to the <input> and the default ref pointing to the <div> enclosing it.