-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Customize the filtering algorithm #1921
Comments
This is a good feature request...would you mind adding it to the feature request wiki page? |
I actually closed it because I felt I had been a bit too harsh about the I will go ahead and make it into a feature request, and I'll be nice about Thanks, On Fri, Jun 24, 2011 at 12:29 PM, toddparker <
|
Thanks Jason, I appreciate it! We're a tiny team working on this so features like this aren't as fleshed out right now as we'd all like. If you do figure out a clean way to make this extensible, please submit a patch. |
So I'm not really familiar with git and submitting patches (been stuck in the svn world), but I have a simple working method to skip any non-alphanumeric characters within the "listview" filter extension that can be enabled by adding data-filter-skipspecial="true" to your listview ul. It defaults to false: but if set true does a replace on both input value and "itemtext" with the following: which only compares like strings containing alphanumeric characters, and without excess whitespace as might be added by removing an ampersand or another character that might stand alone. The character itself can still be typed in without effect, as the compared input string is still filtered. It might be nice to give developers the option to specify an array of allowed or filtered characters, but I think this would suit our needs for now. |
I have added this feature to a branch and submitted a pull request. Sorry for the branch naming convention. I was following https://gist.github.com/726275 instructions and being a gitN00b just followed along exactly. |
Pull request here: My thought on this is that instead of creating a special case for this one situation, we'd be better off having a pluggable solution that lets' people use whatever parsing logic they want. I can see the current approach ballooning as people want to add scoping and more complex searching logic. |
Thanks, closing this, will reopen #2092 |
The listview filter proceeds to do a character by character filter, which is only useful in very limited number of cases. It doesn't work if all products have reg or tm symbols in them or have long names.
Self-edited rant about lack of low-level documentation here... uneccessary
The text was updated successfully, but these errors were encountered: