thisbeyond / solid-select

The Select component for Solid.
https://solid-select.com
MIT License
172 stars 18 forks source link

Passing in ref not working #42

Closed koolkao closed 2 months ago

koolkao commented 1 year ago

When I pass in a reference like below, similar to the SolidJS tutorial, the ref ends up being undefined

let selectRef; return . Something like:

let ref; <div onClick={ ()=> ref.focus() }>label</div> <Select ref={ref}></Select>

Is there a better way to do this? thank you

martinpengellyphillips commented 2 months ago

I guess this should pass ref through to Input essentially. Will take a look at that.

martinpengellyphillips commented 2 months ago

Added in 2281a3cd39a7ca680b8fbce582c716ff4fbafd24 - will be available once released with an example on the website to match.

martinpengellyphillips commented 2 months ago

Release 0.15.0 has now been published which should address this. See new example at https://solid-select.com/?example=Focus%2520with%2520ref