Skip to content

Colspan breaks ordering of cells using data attribute #1708

@daichihoang

Description

@daichihoang

Hello,

JS Fiddle demo: https://jsfiddle.net/daihoang/5os6uypj/5/

I have a simple table where the first column has a mixture of cells with dates and cells with text.

To sort this, I have added a data attribute to each cell and using the custom parser to sort by this attribute. In the example above, it's simply "data-row", starting at 0 for the first row

However, I am running into an issue where the cells using "colspan" are not being sorted according to their data attribute (data-rows 4, 7 and 10)

If i remove the colspan, it works as expected.

I read https://mottie.github.io/tablesorter/docs/example-colspan.html and I don't think I am missing anything, it's a fairly simple implementation without any widgets.

Can anyone help?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions