Responsive + TableTools sRowSelect - suppress details row click event

Responsive + TableTools sRowSelect - suppress details row click event

This is a bit of an edge case. I have some DataTables with a "Batch Edit" mode where I toggle sRowSelect off and on via something like:

api.tabletools().fnSettings().select.type = type;

This part works great. I'm looking to prevent the toggling of Responsive details rows when a table has sRowSelect: 'os', as it is very distracting to be toggling details rows while trying to make a complex selection. I've tried to catch the event, ie:

I also tried to find a way to toggle the details row off and on via the API, and I came up empty. Another approach that would work, but I didn't see documented, is to trigger the display of the details row manually instead of with

Answers

The settings object is "private" (in the sense that it is visible, but shouldn't used publicly!) and writing changes to it is not something that is supported and might cause unexpected side effects.

In this case, TableTools hasn't been designed to handle toggling the row selection - you could remove the event handler using $().off() but then you'd need to add it again in future if you want to toggle it back on. Either you could hack the library to add that feature, or

Use the replacement to TableTools that I'm working on (imaginatively named Select). It haven't been released yet (I've still to write the documentation), but you are welcome to try it out if you like. Or if you hang on until next month it will be released as part of a major update to DataTables' extensions.