Open chrisjpatty opened 5 years ago
BTW, the workaround for this was to put an arbitrary component inside the html of the children that calls an event handler when it mounts. That works for this case, but it would be nice to have that API exposed by the Animate component itself.
When expanding or collapsing elements which contain inputs, it's a common accessibility pattern to focus the first focusable element. However, when I set the state to show, even when using the setState callback, the elements still haven't been mounted. This makes it not possible to reliably focus the first element. Can I propose an
onMount
event prop of some kind, that signals the parent component when the children have actually been mounted? If that sounds acceptable I'd be happy to look at creating a pull request myself. Thanks for all the hard work on this package!