raven raven - 1 year ago 93
AngularJS Question

Can't enter text on ui-select in angularjs 1.5.8

I have one ui-select as the following:

<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">
<small>ID: {{student.id}}</small>

The problem that I have is that I can't enter any text on the input which maps to this ui-select. Only works if I paste text (Right Click -> Paste) CTRL+V, doesn't work either, though. It's like at some point in the ui-select directive is preventing the key down event.

These are my bower dependencies:

"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"

Any help would be appreciated.

Answer Source

There was a bug on the version of the ui-select 0.9.4, which I was using. For more details, you can read it here: github.com/angular-ui/ui-select/commit/0d81493

I downgraded the version to 0.9.3 it is working fine.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download