maslianok / react-resize-detector

A Cross-Browser, Event-based, Element Resize Detection for React
http://maslianok.github.io/react-resize-detector/
MIT License
1.25k stars 91 forks source link

Support for different selectors and/or multiple selectors #58

Closed nimi closed 5 years ago

nimi commented 5 years ago

Hi @maslianok!

Thanks for the very cool lib!

Right now this library only supports adding a resize detector on a parent element or a resizableElementId. It would be nice if this were a bit more flexible and it would allow both a way to provide a selector that is not only just id (for example using querySelector) and allow for more than one selector to be added and I can listen to resize events on multiple elements. Thoughts?

maslianok commented 5 years ago

@nimi v4 introduces querySelector props

nimi commented 5 years ago

Awesome. Thanks @maslianok