Not able to pass ref down Collapse Component to DOM

Posted 4 months ago

Not able to pass ref down Collapse Component to DOM #620

Bug report 🐞

Version & Environment

  • Version of browser: 92.0.4515.159
  • Version of geist-ui/react: 2.2.0

Expected Behaviour

I expected collapse component to have forwardRef in place, so it'd pass my ref to the DOM. I don't think it does. I wish to scroll to a particular collapse component within the collapse group. Since, I am not able to attach a ref to it, hence not able to scroll that collapse into view.

Actual results (or Errors)

I got an error: Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Created 3 months ago

Hello everyone! Is this a valid bug/enhancement? If so, can I work on this? Thank you :)

Created 1 week ago

Currently forwardRef is only added to a few complex components, and most of the time you don't have to use ref. In what scenario does the Collapse component need to use ref instead of the original controlled component solution?