Is there any way to implement a case-insensitive filter/search in a dash datatable? Basically if I am searching for “Cat” i would like to be able to search “cat” and get the same element in the table. This of course assumes there is no element named “cat” in the table.
I just started using dash datatables for my company and they have requested this as well. Any thoughts from anyone?
You could make the strings all caps, or you could use the filtering with python and with python using the ‘contains’ operator to compare after using the lower on both strings, but I agree this is cumbersome for such a common filtering functionality. Would be nice to have this out of the box or have an attribute along the lines of “filter_case_sensitive” attribute in the DataTable
This is a great idea. Made a feature issue here to track progress. Note that this is not on the immediate roadmap at the moment: https://github.com/plotly/dash-table/issues/545
Pandas series has contains with case option. For example:
Hey @chriddyp! Any updates on this feature?
I regularly work with text data, so this is a pretty useful feature for interactive text explorers that I frequently put in my dashboards.
No updates unfortunately- none of our customers have yet requested this feature so it’s on the back burner while other requested features get built. That being said, we made a PR that got partly there and this would be a good project for someone in the community to pick up and bring across the finish line. We’re happy to mentor anyone interested.
What is the underlying programming language there?
Any updates on this feature (ignoring case sensitivity in search fields in datatables) ?
if not, what is the timeline for this?
In the meantime, can you please suggest some solutions. I think custom filter is a temporary solution for now.
Would be very nice as a feature @chriddyp . Any information about this? Is there a short filter callback to have the case insensitive feature?
There are no updates yet but we are hoping to schedule this one in in the next few weeks. A gracious sponsor has sponsored this work (among other items we’re working through!) and so it is in the pipe.
Looking for this featuring. The case-insensitive and the “partial-search” as well.
Now if you search part of the word it did not find.
Have been using Ctrl+F until its not available.
Hi @rgime and welcome to the Dash community
Great news - this feature will be in the next release
Is there a way to turn off toggle case sensitive and choose one as a permanent choice?
Yes, you can select whether the filter is case sensitive or not on the table or column level with the
filter_options prop. This is from the DataTable Reference
filter_options ( dict ; optional): There are two
filter_options props in the table. This is the table-level filter_options prop and there is also the column-level
filter_options prop. These props determine whether the applicable filter relational operators will default to
insensitive comparison. If the column-level
filter_options prop is set it overrides the table-level
filter_options prop for that column.
filter_options is a dict with keys:
case ( a value equal to: ‘sensitive’ or ‘insensitive’ ; optional)
Thanks for the quick response.
Trying to get it to apply to a table…is it like this?
Hi @ckeoirm - looks right! See an example here