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
436 stars 177 forks source link

Checkbox Filter Need Exact Match #273

Open sjahlers opened 7 years ago

sjahlers commented 7 years ago

I'm using the checkbox-text-filter and would like it to find exact matches only. For instance, searching for "apple" would pull a value of "apple" only, not a value of "apple and banana". Similar to the textbox-filter data-mode setting. Is this currently available? Is there a way I can implement it on my own?

1rosehip commented 7 years ago

For now it's not supported, but you can definitely implement it on your own. Please compare checkbox code with the textbox filter code and look for the 'data-mode' there.

Checkbox filter: https://github.com/1rosehip/jplist/blob/master/src/addons/filter-toggle-bundle/js/checkbox-filters/checkbox-text-filter-view.js

Textbox filter: https://github.com/1rosehip/jplist/blob/master/src/addons/textbox-filter/js/textbox-view.js

sjahlers commented 7 years ago

Thanks for the reply. I'm still a new developer so I guess I need more direction in how to implement it. Is exact match an option with data-mode?

1rosehip commented 7 years ago

Unfortunately there is no a detailed tutorial about addons creation for now. I mark this question as a feature request and add it to the plugin roadmap.

dimsis commented 6 years ago

It defenetly needs this "exact match" feature. Example of few fail filters like it works now: "Luxury Hotel" "Hotel"

(if you filter hotel both of the above contains the 'hotel' keyword).

Star filters:



* If you want to return only hotels with 1 star you just can't because the same characters is contained in all other strings too.

Any suggestions to overcome this issue are welcome.