문제

I am using typeahead from Angular Bootstrap. Sample plunker provided by them is here. As you can see $scope.states is filled by the array:

$scope.states = ['Alabama', 'Alaska', 'Arizona', ... ];

And it looks like this:

enter image description here


However, if I change the plunker to an array of numbers, as in this plunker; although you can move your cursor, and it returns you the values starting with the number you have typed; you can't see the content on the dropdown and it looks weird:

enter image description here

Is there a way to make typeahead work with integers?

도움이 되었습니까?

해결책

There was a bug in the typeahead implementation (see https://github.com/angular-ui/bootstrap/issues/1777) that was fixed yesterday via https://github.com/angular-ui/bootstrap/commit/09678b1260dadb0a399d8e71fc2e1f5597c9ca31. The fix will be part of the next release (0.11.0), for now you can monkey-patch your version based on the change done in the referenced commit.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top