On my site I am using the plugin wpDataTables based on jQuery DataTables.
My first column in the price list table contains values - AUR
, D
, DH
, etc. Table is programmed to show only first 6 results out of many.
Here is the problem: If I want user to find value D
and user types in the search field D
, you'll get a list with values DH
.
It happens because by default jQuery DataTables plugin finds records that contain value D
(such as DH
, etc), but I want it to perform exact match.
Please see Excel spreadsheet containing all records for reference.
You need to follow this documentation and end up with something like this:
You can also use quotes when you input or add them before passing to the search function:
Documentation: https://datatables.net/reference/api/column().search()