We have a long list with accounts for which users can set permissions through checkboxes in this list. But users can also filter the list (say with a search query). But what if a user sets permissions and then filters the list so that the persmissions for that item are not visible anymore? Should that invisible permission be saved or not? Or is there a nicer UI pattern?
The invisible permissions must be saved. Because from the user perspective , the user will go on giving permission and at some point if the user cant find a particular name he/she might resort to filtering and this should not cause the already given permissions to be lost.
Alternative design: You can use chosen plugin to do this in a more efficient way. The multiple select option in this helps user to see all the selected options thus far at one place. User can keep adding to this list , and then apply filter as and when needed