Filter data grid

The way the filter below works is when selecting a checkbox and then typing, the selection is being erased. I would like to keep the selections and present them at some part of the filter, in addition to allowing the user to remove a selection. Is there a best practice for that?

Filter