DataTables / Responsive

Responsive extension for DataTables, providing support for complex tables on all device screen sizes
Other
148 stars 86 forks source link

Disabling child row display causes error #69

Closed MacTwister closed 8 years ago

MacTwister commented 8 years ago

I was trying to disable the plus icon and child row expanding, so I only want to hide rows. But I get an error in console about responsive.details.display not being a function. Am I doing something wrong or is there a bug?

Docs mention setting responsive.details to false: https://datatables.net/extensions/responsive/init

I think this reproduces it: http://jsfiddle.net/07w1ucgu/

Thanks for the support.

DataTables commented 8 years ago

That was an error which was corrected by ed1fdb5a85a33da6eb77b946e7388f36ede90a6f. It will be included in the next release.

MacTwister commented 8 years ago

Thanks @DataTables great!

Now I downloaded the latest branch and ran the same code, I don't these the same error about display and all seems to be working, But when I click a row I get the following error in the browser ReferenceError: Can't find variable: e on datatables.responsive.js line 598.

Side note, in my application, I plan to make double click open a modal.

DataTables commented 8 years ago

Can you link to a page showing the error so I can debug it please.

MacTwister commented 8 years ago

Sorry, I don't know how, because it is based on the master branch not a release version online. If you take the same jsfiddle example above and use with the master branch here, you'll see the error.

Or you can just see it from the JS code, look at dataTables.responsive.js:

@line 569: $( dt.table().body() ).on( 'click.dtr mousedown.dtr', selector, function () { Which has not e in the function params

@line 598: if ( e.type === 'click' ) { you can see e is not defined in the above function

DataTables commented 8 years ago

Got it - thanks. Fix committed :-)