Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollX true with Responsive set to false doesn't work #143

Closed
PrzemyslawKlys opened this issue Jun 26, 2019 · 2 comments
Closed

ScrollX true with Responsive set to false doesn't work #143

PrzemyslawKlys opened this issue Jun 26, 2019 · 2 comments

Comments

@PrzemyslawKlys
Copy link

I wanted to set responsive to false and enable scrollX. It doesn't work. It works if I remove responsive options altogether. Probably makes sense to have some logic that takes care of this.

responsive: false,
"responsive": {
    "details": false
},
"select": true,
"searching": true,
"stateSave": true,
"columnDefs": "",
scrollX: true

Fiddle showing this issue: https://jsfiddle.net/6mp0e4ky/1/

@DataTables
Copy link
Collaborator

responsive: false,
"responsive": {
    "details": false
},

while its technically valid Javascript, its also impossible Javascript. responsive can't both be false and an object at the same time! The second one is the one that wins there, so you actually just have:

"responsive": {
    "details": false
},

which enables Responsive with details disabled.

There isn't any logic we can add to handle that case, since the object is never created with two responsive properties.

@PrzemyslawKlys
Copy link
Author

PrzemyslawKlys commented Jun 27, 2019

I see. Thanks! Sorry, although setting responsive: false without object responsive has the same behavior I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant