Click here to Skip to main content
15,924,367 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a search functionality in which I have a ui select element as a search filter in a .net project with which I am using angular JS.
It is an autosuggestion control. If I select some value of the dropdown, it gets selected.
We can search the value in it(autosuggestion) by typing in the dropdown control.
What I want is if I do not select any value from the dropdown, I want the text entered in that control to be selected.
To summarize, I want the value to be selected or the text, typed in that control.
the Part of the code:

<ui-select id="wrkshpTitle" ng-model="wrkshpTitles.selectedWrkshpTitle" 
           ng-keyup="hn($select)"ng-disabled="disabled">
    <ui-select-match placeholder="No Filter">
        {{$select.selected.OfferingNme}}"<"/ui-select-match>
    <ui-select-choices when-scrolled="loadMoreRecords()" percent="70" 
                       repeat="title in wrkshpTitles|filter: $select.search">
        <span ng-bind-html="title.OfferingNme|highlight: $select.search">
    </ui-select-choices>
</ui-select>


I have used here extra "" so that I could paste the html code here.

What I have tried:

I have successfully implemented the dropdown and used the suggestions of stackoverflow and other things but to no help.
Posted
Updated 27-Aug-16 10:12am
v2

1 solution

Hi @rohit12091,

did you have a look at the HTML **datalist**? Seems like it is doing what you described in your question.

HTML datalist Tag[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900