This repository was archived by the owner on Feb 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 495
Using individual Pipes for searching and individual comumn filtering #1812
Copy link
Copy link
Open
Labels
feature requestUse to ask for feature requestUse to ask for feature requeststaleUsed to close issues for inactivity (by bot)Used to close issues for inactivity (by bot)
Description
Hi
In our tables we have individual pipes for searching and individual column filtering.
i.e. it looks like this:
<input id="query" name="query" type="search" placeholder="Text Search" [(ngModel)]="query" />
<table>
<thead>
<tr>
<th>
<select [(ngModel)]="searchField1" id="searchField1">
@for (field1Id of fields1; track field1Id) {<option [value]="field1Id">{{field1Id}}</option>}
</select>
</th>
<th>
<select [(ngModel)]="searchField2" id="searchField2">
@for (field2Id of fields2; track field2Id) {<option [value]="field2Id">{{field2Id}}</option>}
</select>
</th>
<th>
<select [(ngModel)]="searchField3" id="searchField3">
@for (field3Id of fields3; track field3Id) {<option [value]="field3Id">{{field3Id}}</option>}
</select>
</th>
</tr>
<tr>
<th>Field 1</th>
<th>Field 2</th>
<th>Field 3</th>
</tr>
</thead>
<tbody>
@for (data of datas | search:query | listFilter:'field1':searchField1 | listFilter:'field2':searchField2 | listFilter: 'field3':searchField3; track data.field1) {<tr>
<td>{{data.field1}}</td>
<td>{{data.field2}}</td>
<td>{{data.field3}}</td>
</tr>}
</tbody>
</table>
So, for the attributes field1, field2 and field3 we use an indiviual pipe (ListFilterPipe) and to search we also use an inidivudal pipe (SearchPipe).
Unfortunately I cannot find anything like this in your documentation under https://l-lin.github.io/angular-datatables/#/advanced/individual-column-filtering
Thanks very much.
Best regards
Mike
Metadata
Metadata
Assignees
Labels
feature requestUse to ask for feature requestUse to ask for feature requeststaleUsed to close issues for inactivity (by bot)Used to close issues for inactivity (by bot)