It would be useful if the Collapse component could accept props like onOpened (or onShown), onClosed (or onHidden), etc. An example of needing this is I'm building a feature in my app where when a Collapse component is opened, I want to scroll the header of the Collapse to the top of the screen. This causes some trouble because I need to perform the scroll after the Collapse has finished opening, otherwise the scroll position would be off.
I took a crack at implementing an onOpened prop here but because I don't know if you guys have greater plans for how to handle events across the library, I figured it's not worth working on a PR right now.
It would be useful if the Collapse component could accept props like onOpened (or onShown), onClosed (or onHidden), etc. An example of needing this is I'm building a feature in my app where when a Collapse component is opened, I want to scroll the header of the Collapse to the top of the screen. This causes some trouble because I need to perform the scroll after the Collapse has finished opening, otherwise the scroll position would be off.
I took a crack at implementing an onOpened prop here but because I don't know if you guys have greater plans for how to handle events across the library, I figured it's not worth working on a PR right now.