1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
438 stars 176 forks source link

Exact Match Results desired for filters like '1' or 'A' not returning '100' or 'AAA' #156

Closed variablevisions closed 8 years ago

variablevisions commented 8 years ago

Right now, jplist will return results 'containing' .... not exact... So, I build filters like 1 and they return 100, 001, etc. I build filters like 'A' and they return AAA, and AAAA...

I know you added startsWith....can you build in EXACT to the core sometime ???

I've tried for hours to do this with jquery but it doesnt work well: $.extend($.expr[":"], {exactly: function( element, index, details, collection ){return $(element).text() === details[3];}}); $("div:exactly(A)").toggleClass("filter").parent().toggleClass("filtercontainer");