2

I've built in the ng2-bootstrap's Typeahead Component, but I need the field to drop down on click. Unfortunately the Dropdown Components do not support this. Is there any option (I have looked, but can't find) that allows you to have the Typeahead Component drop down like this? As if it's using Typeahead with an empty string search?

I should mention that I have tried the typeaheadMinLength option, and it allows the full list to show after backspacing your entry, but not on focus.

Current Code:

<input [(ngModel)]='filters.itemFilter' [typeahead]='items' typeaheadOptionField='name' typeaheadMinLength='0' class="form-control" placeholder='Items'/>

Any help would be appreciated.

1 Answer 1

2

you should try [typeaheadMinLength]="0" instead of typeaheadMinLength='0'. It worked for me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.