isteven / angular-multi-select

A multi select dropdown directive for AngularJS. Allows you to use HTML tags and CSS in the data. Requires only AngularJS and nothing else.
isteven.github.io/angular-multi-select
MIT License
1.08k stars 518 forks source link

Reset Selected Item #464

Closed Sanjaygpatel closed 8 years ago

Sanjaygpatel commented 8 years ago

Hi

I can't remove selected item from multi select from any external button click event ?

if i remove input-model for control then automatically selection gone but then i need to reassign list input model. is there any way to only reset value, not reassign list to input model

thanks,

isteven commented 8 years ago

Hi @Sanjaygpatel ,

I'm not sure you can "reset" like that, but you indeed can update singular value, for example:

Let's say input -model is $scope.data, then you can do:

$scope.data[ 2 ].name = "Hello!"

The directive should pick it up after closing & re-opening.