So I've dug all through this trying to figure out what is wrong with the filtering and I can't seem to figure it out. Basically my issue is using the "Ends with" filter on a string type. I have been able to reproduce a sample of this and put it on JSFiddle:
Click to view demo
If you filter on the Name column, select "Ends with" and the text "Smith" you get the people named: Joe Smith, Ryan, and Slappy Smith. How or why Ryan got in there is baffling to me...as he clearly shouldn't be.
I stepped through a good portion of the open source and found that this is what's happening:
(d.Name.toLowerCase().lastIndexOf('smith') == d.Name.toLowerCase().length - 5)
I'm assuming this has something to do with the way the data is being cached/queried but I have been unable to find a solution. At first I thought it may be because "Ryan" is shorter than the string I'm searching for, but in that case Don and Bob should have showed up as well...
Any thoughts/explanations/solutions?
Click to view demo
If you filter on the Name column, select "Ends with" and the text "Smith" you get the people named: Joe Smith, Ryan, and Slappy Smith. How or why Ryan got in there is baffling to me...as he clearly shouldn't be.
I stepped through a good portion of the open source and found that this is what's happening:
(d.Name.toLowerCase().lastIndexOf('smith') == d.Name.toLowerCase().length - 5)
I'm assuming this has something to do with the way the data is being cached/queried but I have been unable to find a solution. At first I thought it may be because "Ryan" is shorter than the string I'm searching for, but in that case Don and Bob should have showed up as well...
Any thoughts/explanations/solutions?