Skip to content
This repository has been archived by the owner on Feb 2, 2025. It is now read-only.

Using individual Pipes for searching and individual comumn filtering #1812

Open
maerni opened this issue Nov 15, 2024 · 1 comment
Open

Using individual Pipes for searching and individual comumn filtering #1812

maerni opened this issue Nov 15, 2024 · 1 comment
Labels
feature request Use to ask for feature request stale Used to close issues for inactivity (by bot)

Comments

@maerni
Copy link

maerni commented Nov 15, 2024

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

@maerni maerni added the feature request Use to ask for feature request label Nov 15, 2024
Copy link

stale bot commented Jan 31, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Used to close issues for inactivity (by bot) label Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request Use to ask for feature request stale Used to close issues for inactivity (by bot)
Projects
None yet
Development

No branches or pull requests

1 participant