Cascading filters in dataTable issue
Cascading filters in dataTable issue
Hi,
I am trying to use the cascade filter following an example here: https://live.datatables.net/gejojiqu/1/edit
The problem however is that my table data have hyphen(-) in them. So selecting a filter option that has hyphen results in the Select field being empty, although it does do the filtering. The issue is also happening in the example linked above. If you select the date or salary filter, the filtering works but the Select dropdown in that column is empty.
This probably has to do with the following line
if ( currSearch ) {
select.val( currSearch.substring(1, currSearch.length-1) );
}
where val is unable to set select because of special characters in the string. Is there a workaround for this ?
Answers
Sorry, found my answer here:
https://datatables.net/forums/discussion/75641/datatables-does-not-retain-the-selected-filter-column-values-if-the-value-has-special-characters
I think if the example could be updated to reflect this, it would be great. Thank you.
That specific URL can't be updated. You can update the example to reflect the issue you fixed. You will get a new URL. Post the updated test case here.
Kevin