lumapps/lumX

lx-select doesn't update selected values

Open

#352 opened on 2015年9月25日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)JavaScript (1,974 stars) (281 forks)batch import
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 to ALF (1986–1990) I assume I should be able to do the same with dropdown based on selects.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?

コントリビューターガイド

lx-select doesn't update selected values · lumapps/lumX#352 | Good First Issue