Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2366

Specify a Per Column HTML Data Attribute Search RegEx

$
0
0

Description of problem:
Good afternoon. I'm writing regarding a filtering/searching question.

I need to find exact matches of full values (i.e. ^searchTerm$) on some columns and allow the default search on other columns. I'm using html data attributes on th elements to define columns.

Is there a way to override the default search on specific columns via html data attributes? For example, if I wanted to only find full phone numbers, but I want to find partial first names and last names.

<!-- table head -->
    <th>First Name</th>
    <th>Last Name</th>
    <th data-searchRegex="^value$">Phone Number</th>
    <!-- rest of table body -->
</table>

Thank you for your help!
Jeremy


Viewing all articles
Browse latest Browse all 2366

Trending Articles