You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2021. It is now read-only.
I forked the plunker example and tried to apply a inital value: http://plnkr.co/edit/s1j20CAiOqlioeAWvo5y?p=preview $scope.select.selection = [{ label: 1, value: 1 }, { label: 2, value: 2 }];
or $scope.select.selection = [1,2];
The text was updated successfully, but these errors were encountered:
Looking the code I noted that the controller.$viewValue return undefined, no matter if ng-model has some. So a included a new scope attribute on directive and now I can get the model initial value. scope: { initModel: '=' },
Now inside updateOptions() I did var viewValue = scope.initModel || controller.$viewValue; and it works. I don't know why controller.$viewValue is returning undefined.
Thanks for the bug report and the plunker. I fixed it. The viewValue was set in applyConfig with an empty selection. I will release 0.4.6 with this fix and some performance improvements as soon as possible.
I'm passing a model with some IDs, but the dropdown don't initialize these values. Always starts with no selected items.
<div w11k-select ng-model="item.role_ids">
item.role_ids = [1,2,3]
How could I accomplish that?
I forked the plunker example and tried to apply a inital value: http://plnkr.co/edit/s1j20CAiOqlioeAWvo5y?p=preview
$scope.select.selection = [{ label: 1, value: 1 }, { label: 2, value: 2 }];
or
$scope.select.selection = [1,2];
The text was updated successfully, but these errors were encountered: