Skip to content

not- classes cannot be combined #55

@Philzen

Description

@Philzen

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 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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions