alphabetSearch bug with mixed case
alphabetSearch bug with mixed case

Hi -
I have alphabetSearch working nicely in a table. Recently data was added to the table with mixed case - specifically, lowercase i as the first letter of the word.
I was able to add [a-zA-Z] to get it to bin correctly, but I can't see why it doesn't return the lowercase row. Any thoughts?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'm guessing you are referring to the Alphabet Search blog. I changed the code for lower case only and have
ashton Cox
with lower case. I also commented out the.toUpperCase();
in thebin
function:http://live.datatables.net/zukuwiwi/1/edit
Not sure what changes you made. Maybe you can post a test case or update mine to show what you have. Then we can help you debug.
Kevin
Updated my example to have both upper and lower case search letters and it still works:
http://live.datatables.net/zukuwiwi/2/edit
Kevin
Thanks. It was the blog I was referring to.
The second example is closer to my goal; any thoughts on how to combine the upper- and lower-case in the search? Meaning, clicking on A would result in both Angelica & ashton in the result set?
Put back the
.toUpperCase();
that I commented out above so that the count under the letters is correct. Then add the.toUpperCase();
to the searchData in the search plugin, for example:Here is the updated example:
http://live.datatables.net/zukuwiwi/5/edit
Kevin
Thank you!