nexxtway / react-rainbow

🌈 React Rainbow Components. Build your web application in a snap.
https://react-rainbow.io
MIT License
1.79k stars 112 forks source link

fix: add types to ref in components that expose some methods #2590

Open LeandroTorresSicilia opened 1 year ago

LeandroTorresSicilia commented 1 year ago

Some components like input expose method through ref like focus, blur, click, etc, we need to add this interface to ref exposed then when we use it like:

inputRef.current.focus()
...
<Input ref={inputRef} />

then inputRef.current.focus() will recognize the properties exposed