crehbein
14 Sep 2010, 11:14 AM
Hi,
I just noticed there's a bug in the isFiltered() method in BaseStringFilterConfig. isFiltered() is always returning true in a particular case where I'm setting up a filter to include all models with a value of "C" for some key, for example. The line that checks test vs. value is:
return v.toLowerCase().indexOf(t) == -1;
if "C" is first converted to lower case, then indexOf("C") will always return -1, so it'd be filtered out.
This bug is evident in the Remote Filter Grid example on your site by adding a filter for 'A'. I'd expect to see Apple and all the other companies whose names start with a capital 'A', but I get no results. Searching for 'a', on the other hand, works as expected.
Thanks,
- C
PS - I take it back, searching for 'a' in the remote filter grid example doesn't work either, as it includes "Apple, Inc." in the results which doesn't contain a lower-case 'a'. What's the reason for the case conversion?
I just noticed there's a bug in the isFiltered() method in BaseStringFilterConfig. isFiltered() is always returning true in a particular case where I'm setting up a filter to include all models with a value of "C" for some key, for example. The line that checks test vs. value is:
return v.toLowerCase().indexOf(t) == -1;
if "C" is first converted to lower case, then indexOf("C") will always return -1, so it'd be filtered out.
This bug is evident in the Remote Filter Grid example on your site by adding a filter for 'A'. I'd expect to see Apple and all the other companies whose names start with a capital 'A', but I get no results. Searching for 'a', on the other hand, works as expected.
Thanks,
- C
PS - I take it back, searching for 'a' in the remote filter grid example doesn't work either, as it includes "Apple, Inc." in the results which doesn't contain a lower-case 'a'. What's the reason for the case conversion?