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 was archived by the owner on Feb 18, 2024. It is now read-only.
but also i have items selected so i should update it as
function remove(id) {
vm.items = vm.items.filter(item => item.id === id)
vm.selected = vm.selected.filter(item => item.id === id) // from table model
}
and it works, but one thing isn't
i have counter of selected
vm.all = vm.selected.length;
and after filtering of selected items all references are destroyed cause filter return new array (as you know).
i can use splice to mutate vm.selected, but i need immutable solution
Hello
Have situation where i need to filter items when item removed
but also i have items selected so i should update it as
and it works, but one thing isn't
i have counter of selected
and after filtering of selected items all references are destroyed cause
filterreturn new array (as you know).i can use
spliceto mutatevm.selected, but i need immutable solutioncan we do it in immutable way?
Thank you