You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not going to PR this because the project doesn't support typescript, but I added this component to my project, rewrote in in TS and converted it to a React functional component with hooks
Also fixed some issues:
onRequestOptions is debounced by 150ms (currently not configurable via props but very well could be)
Fixed issue where if you scroll partially down the page, the suggestions don't appear next to the typed text
Allows you to pass your own ref from the parent to the input
Forwards any props down to the Component you pass, along with good TS support so it knows which props it needs if your custom component has required props
removed the scroll event listener, because I thought the suggestions should persist if you scroll because sometimes you have to scroll on mobile devices to see the full suggestions list
fixed issue where the suggestions box would go off-screen if you were too close the right edge of the window. Now it subtracts a few pixels off once you start getting close to the end of the window
not 100% confident this will look good for textareas that don't take most of the window width tho!!
This isn't perfect. It needs some more polish, but it works great for me so far:
and thanks @yury-dymov for writing this. There's not really great options for autocompletion, but I found this is one of the best ones, even though it's not maintained
I'm not going to PR this because the project doesn't support typescript, but I added this component to my project, rewrote in in TS and converted it to a React functional component with hooks
Also fixed some issues:
onRequestOptions
is debounced by 150ms (currently not configurable via props but very well could be)ref
from the parent to the inputComponent
you pass, along with good TS support so it knows which props it needs if your custom component has required propsThis isn't perfect. It needs some more polish, but it works great for me so far:
The text was updated successfully, but these errors were encountered: