DataTables / Responsive

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

_detailsDisplay fails with details=false #61

Closed jmcarp closed 8 years ago

jmcarp commented 8 years ago

The detailsDisplay method calls this.c.details.display(...), which fails when the data table is invoked with responsive: {details: false}: "Uncaught TypeError: this.c.details.display is not a function". Is this option still supported?

DataTables commented 8 years ago

Sorry - that was a bug in 2.0.0. Corrected now and will be released in 2.0.1 which I don't expect to be too far away.

jmcarp commented 8 years ago

Thanks!

procmail commented 8 years ago

Just came across this bug as well. Awaiting 2.0.1. Any updates on when it'll arrive?

DataTables commented 8 years ago

Not yet. Support has been taking about 99% of my time recently, so no chance to do any development.

Puresoft commented 8 years ago

I also got this error now,...is there a workaround until 2.0.1 is released ?

DataTables commented 8 years ago

Yes - use the nightly version from this repo.

Puresoft commented 8 years ago

mmm, but I use the packed version,...I've used the download builder.

DataTables commented 8 years ago

You need to wait for the next release if you don't want to use the nightly. It will be available later this week.

Puresoft commented 8 years ago

Thanks, then I'll wait for the next release

rootwalla commented 8 years ago

ver 2.0.1 has a bug. Ln199: if ( details.type !== false ) { should be: if ( details !== false ) {

DataTables commented 8 years ago

Fixed in 6060cef6d0d89b1e4e65f110f3ed20288a58a87b. Thanks for letting me know about that.

The work around for now is to not use responsive.details as a boolean value.

dougajmcdonald commented 8 years ago

If we don't use responsive.details as a boolean, how do we tell responsive not to display child rows? If I remove that and try perhaps:

details: { display: () => { return undefined; } }

or similar, I get the '+' button which in my case I don't want.

DataTables commented 8 years ago

Why wouldn't you use responsive.details as a boolean? If you don't want the details, surly that is the right thing to do?

dougajmcdonald commented 8 years ago

Because you said:

The work around for now is to not use responsive.details as a boolean value.

So my options are, use it as a boolean, as I intend to and have the error thrown. Or mock out a function and have the details show when i don't want them.

Is there a workaround where I can also hide the details?

DataTables commented 8 years ago

Oh I see :-). The fix discussed above is in 2.0.2 which is the current release, so you could just use that?

dougajmcdonald commented 8 years ago

I expect so, although I had been using the NuGet package which I think is at version 1.10.10.

Would you advise using the latest GitHub release in general? it's a bit annoying to need to manually acquire it each time but I can handle that if it's going to keep me up to date more effectively :)

DataTables commented 8 years ago

The Nuget packages aren't maintained by myself, so I'm afraid I can't offer much help there (I have been thinking I should probably start offering "official" Nuget packages now that I've finally got NPM and Bower sorted out though - its just a question of getting the time to do it!).

So yes, either grab the release from GitHub, the DataTables site or NPM.