Open Mattie112 opened 6 years ago
Worked fine. Thanks!
Was this merged on master?
I need this so all options come pre-selected and the user filters then out, instead of selecting then.
May be an odd behavior, I know, but it's what was requested.
As far as I know this is not merged, but feel free to my fork.
@Mattie112 , could you help me on how to use this?
I have someting like this:
<multiselect ng-model="filtro.clientes"
options="clientes"
id-prop="id"
display-prop="nome"
name="cliente"
labels="labelsClientes"
show-select-all="true"
required>```
How do I set all options as selected?
Simply set it in your JS code :)
<multiselect ng-model="selection"
options="options" >
// You can add this in your app.js
$scope.options = [ {id: 1, foo: "bar"}, {id: 2, bar: "foo"} ];
$scope.selection = [ {id: 1, foo: "bar"} ];
Oh yup, it's simple, Thanks! You're awesome!
No probs! Have fun with it!
I'd love to use this feature, any updates on merging this in the master @bentorfs?
By filling the
$scope.resolvedOptions
in both methods we can "preselect" some items.example:
When you load your webpage the item with id 1 is already selected