Typeahead需要输入,

时间:2017-04-06 09:30:40

标签: javascript angularjs

嗨,我对anguler js很新。当我搜索某个下拉列表时,点击下拉列表后我必须再次按Enter键才能工作

    <div class="input-append input-group" style="padding-right: 25px;width: 100%;">
        <input id="inputActionTextBox" type="text" ng-model="asyncSelected"
               typeahead="action as action for action in getActionNames($viewValue)"
               class="form-control"
               placeholder="Search by Action Name or Description"
               ng-enter="stepInputEnterPressed('fromNameSearch')" ng-model-options="{debounce: 500}"  
               ng-keyup="keyPress($event.keyCode, $viewValue)" ng-dblclick="changeHandler()"
               style="font-style:italic; outline: none; width: 100%;"/>
    </div>

基本上我需要在用户点击任何下拉列表stepInputEnterPressed('fromNameSearch')

时调用此函数

1 个答案:

答案 0 :(得分:0)

您可以尝试使用 ng-click 代替 ng-dblclick