jplist icon indicating copy to clipboard operation
jplist copied to clipboard

Checkbox Filter Need Exact Match

Open sjahlers opened this issue 7 years ago • 4 comments

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?

sjahlers avatar Aug 10 '17 20:08 sjahlers

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

1rosehip avatar Aug 18 '17 19:08 1rosehip

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?

sjahlers avatar Aug 25 '17 14:08 sjahlers

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.

1rosehip avatar Aug 25 '17 20:08 1rosehip

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.

dimsis avatar Sep 27 '17 09:09 dimsis