You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Studying the documentation for responsive class logic and also from several use cases i had the assumption that classes are freely combinable. For example, in the fiddle the "Company Name" field will always be shown within tablet and mobile breakpoints by adding mobile tablet in the class attribute.
When using not-*, it turns out the functionality breaks when trying to combine them. As you can try out in the fiddle, removing one of the two on the "Description" class-Attribute will work as expected, using two or more not--classes makes the column behave as if all was set.
This behaviour is inline with my understanding what happens around this area - basically one cancels out the other:
Very good point - this should work, and that it doesn't is absolutely a bug.
I'm not immediately certain what the fix should be - as you point out the rest of the logic is additive, and mixing that the subtractive logic that should be used for the not-* case might be a little messy.
I'll get back to you on this one when I get a chance to look at it a bit closer. Unfortunately it won't be included in the next release of Responsive (since that should be tomorrow).
Fiddle
Studying the documentation for responsive class logic and also from several use cases i had the assumption that classes are freely combinable. For example, in the fiddle the "Company Name" field will always be shown within tablet and mobile breakpoints by adding
mobile tablet
in the class attribute.When using
not-*
, it turns out the functionality breaks when trying to combine them. As you can try out in the fiddle, removing one of the two on the "Description" class-Attribute will work as expected, using two or morenot-
-classes makes the column behave as ifall
was set.This behaviour is inline with my understanding what happens around this area - basically one cancels out the other:
https://github.com/DataTables/Responsive/blob/master/js/dataTables.responsive.js#L425
imho (as this is also a reversed logic) this could be changed to be subtractive, rather than adding all other breakpoints to the
includeIn
array.The text was updated successfully, but these errors were encountered: