help wanted
説明
Hi,
I'm using lx-select 'multiple' and I want to deselect some values from JS. I couldn't find any example how to do this so here are steps to reproduce:
http://ui.lumapps.com/directives/selects with Batarang Chrome plugin:
- If in dev console I execute:
$scope.ajax.selected = 'alf'; $scope.$apply()it automagically updates value toALF (1986–1990)I assume I should be able to do the same with dropdown based onselects.selectedPersons. - When I execute
JSON.stringify($scope.selects.selectedPersons)from console I get:"[{"name":"Wladimir","email":"wladimir@email.com","age":30},{"name":"Estefanía","email":"estefanía@email.com","age":16}]"But after executing$scope.selects.selectedPersons.splice(0,1); $scope.$apply()which removes Wladimir from array leaving only"[{"name":"Estefanía","email":"estefanía@email.com","age":16}]"I still see Wladimir selected in lx-select. I cannot find any way to remove him from selected options from within JS. Is there any way to do that?