angular-ng-autocomplete icon indicating copy to clipboard operation
angular-ng-autocomplete copied to clipboard

Add "MinDropdownLength" Prop?

Open JimLynchCodes opened this issue 5 years ago • 3 comments

Hey, great plugin. 😊

I have kind of a weird request from the designers on my team...

They would like the autcomplete's dropdown to appear ONLY after typing 3 characters.

I see there exists an input from for "minQueryLength" that controls when the function is triggered, but it doesn't affect the dropdown at all. (I could see people wanting this functionality though so I'm ok with keeping this one how it is).

What I'm proposing though is having an additional prop that controls whether the dropdown appears or not.

I think I make be able to hackishly make it work by hooking into the ViewChild and using e.stopPropagation (although please see this issue bc I'm having trouble with that).

In any case, I think abstracting all that away from the lib consumer so they can control with a prop would be much cleaner.

The entry in the docs table could be something like this:

minDropdownLength      | number       | 0       | no            | The minimum number of characters the user must type for the dropdown to be displayed.

Curious how the author(s) feel about this... 🚀 ❤

JimLynchCodes avatar Oct 03 '20 16:10 JimLynchCodes

@JimLynchCodes I'll implement that feature soon. Thank you! <3

gmerabishvili avatar Nov 12 '20 20:11 gmerabishvili

awesome, thanks! ❤️

JimLynchCodes avatar Nov 13 '20 14:11 JimLynchCodes

Any idea when this will be implemented?

tylerdmace avatar Jun 27 '22 23:06 tylerdmace