2016-11-17 29 views
1

輸入文本我有一個用戶界面,選擇如下所示:無法在UI選在angularjs 1.5.8

<ui-select multiple ng-disabled="!report.scenario" ng-model="report.students"> 
    <ui-select-match placeholder="">{{$item.id}}</ui-select-match> 
    <ui-select-choices repeat="{id: student.id} as student in CMP_PASSENGER_MASTER | filter: $select.search" refresh="refreshPassengers($select.search)" refresh-delay="300" reset-search-input="false"> 
     <div>{{student.fullName}}</div> 
     <small>ID: {{student.id}}</small> 
    </ui-select-choices> 
</ui-select> 

,我有是,我不能在輸入文本的問題輸入映射到這個UI選擇。只有當我粘貼文本(右鍵 - >粘貼)CTRL + V,也不起作用。這就像在ui-select指令中的某個時刻阻止按鍵事件。

這些都是我的涼亭依賴關係:

"dependencies": { 
    "angular": "^1.5.8", 
    "bootstrap": "^3.3.7", 
    "angular-cookies": "^1.4.0", 
    "angular-resource": "^1.4.0", 
    "angular-route": "^1.4.0", 
    "angular-sanitize": "^1.4.0", 
    "angular-touch": "^1.4.0", 
    "underscore": "^1.8.3", 
    "angular-ui-select": "^0.19.4", 
    "angular-bootstrap": "^2.2.0", 
    "angular-bootstrap-switch": "^0.5.1", 
    "angular-ui-switch": "^0.1.1", 
    "angular-xeditable": "^0.4.0", 
    "angularUtils-pagination": "angular-utils-pagination#^0.11.1", 
    "angular-confirm-modal": "^1.2.6" 
    }, 

任何幫助,將不勝感激。

回答

0

在我使用的ui-select 0.9.4版本中存在一個錯誤。欲瞭解更多詳情,你可以在這裏閱讀:github.com/angular-ui/ui-select/commit/0d81493

我把版本降級到0.9.3它工作正常。

0

只看到一件我不能解釋的事情,那就是reset-search-input這不應該在ui-select-choices上,而是在UI選擇的水龍頭上。這將在選擇選項後重置。嘗試並改變它,看看它是否有幫助。 ui-select Wiki

+0

嗨,是的,你是對的。我轉移到UI選擇,但它仍然無法正常工作。 – raven

+0

你可以分享一個搶劫者嗎?你是否也嘗試過版本19.5? – Jefiozie

+0

在強盜中我無法複製它。這是該錯誤:https://github.com/angular-ui/ui-select/commit/0d81493 – raven