react-textarea-autocomplete icon indicating copy to clipboard operation
react-textarea-autocomplete copied to clipboard

Allow immediate autocomplete with no trigger character

Open eclecto opened this issue 4 years ago • 4 comments

My use case is that I want to use inline trigger-based autocompletion elsewhere in my application, but I have a username field where I would like autocomplete to start immediately on any input, without need of a trigger character and without needing a separate plugin. Maybe a new prop that can accept a single settingType object and can be used in place of the trigger prop?

eclecto avatar Nov 06 '19 20:11 eclecto

Hey, thanks for the idea! However I'm not sure if we want to support this usecase. RTA supports only textareas anyway. I'll think about it, maybe we can come up with some solution. Anyway, we need to keep the complexity low.

jukben avatar Nov 07 '19 08:11 jukben

I was able to use a standard input field instead of a textarea by passing in textAreaComponent='input'

eclecto avatar Nov 07 '19 17:11 eclecto

Is it possible to trigger autocomplete with an empty string? I tried it here: codesandbox I tried setting the trigger as "" and null but to no avail. Usecase: Render auto-suggestions on each word.

Sarthak-Agrawal avatar Jun 26 '20 21:06 Sarthak-Agrawal

Hi! I'm also interested in Sartahk's comment to trigger suggestions on ANY character. I could generate a trigger object with any character, but it looks ugly ;-) I tried passing a Proxy whose get method returns my filtered options, but I didn't get called. Could trigger accept an object with a generic get in which I could return my filtered options for any character typed ?

SebastienAuvray avatar Jun 08 '21 09:06 SebastienAuvray