I have this table, with a checkbox filter:
<p-dataTable [value]="newCountries" #dt>
<p-column field="title" header="Name"></p-column>
<p-column field="alpha_3" header="Code" [filter]="true" filterMatchMode="equals" filterType="checkbox">
<ng-template pTemplate="filter" let-col>
<p-checkbox (onChange)="dt.filter('', col.field, col.filterMatchMode)"></p-checkbox>
</ng-template>
</p-column>
</p-dataTable>
Whenever I click the checkbox filter, I want to hide all the rows with values other than an empty string. The data is either a three letter string or an empty string. However, if I put ''
as the value for the filter, it just shows me all the fields. Is there any way to achieve this?