Open ammaar8 opened 3 years ago
Had the same problem, I wanted to set filter_options={'case': 'insensitive'}
and hide the button but the numeric filtering was wrong, I solved this by setting the "filter_options" for each column instead of using the table-level "filter_options", for example:
columns = [{
"name": "continent"
, "id": "continent"
, "type": "text
, "filter_options": {"case": "insensitive"}
},
{
"name": "lifeExp"
, "id": "lifeExp"
, "type": "numeric"
, "filter_options": {"case": "sensitive"}
}
]
I hid the button using CSS:
input.dash-filter--case {
display: none;
}
Filtering for numeric columns breaks if we set column filtering to be case insensitive. This can be checked on https://dash.plotly.com/datatable/interactivity. If the toggle is set to be case sensitive, it filters correctly but as soon as I change it to be insensitive it breaks. This prevents us from setting
filter_options={'case': 'insensitive'}
and hide the toggle button since the filter won't work correctly. I think case sensitivity should be ignored if the column type is numeric or we can just always filter it with case sensitivity?