gridjs icon indicating copy to clipboard operation
gridjs copied to clipboard

Incorrect nested header - colspan vaue not correct

Open ecofi opened this issue 1 year ago • 0 comments

Describe the bug If the parent column includes only one child column and the child columns includes multiple columns, the header of the parent column is incorrect. I did not test if other scenarios are possible also resulting in incorrect colspan value and might be assesses in fixing the issue.

To Reproduce Steps to reproduce the behavior: This is an example, modified from example page here: https://gridjs.io/docs/examples/nested-header const grid = new Grid({ columns: [ { name: 'Test', columns:[ { name: 'Name', columns: [{ name: 'First' }, { name: 'Last' }] } ] } ], data: Array(50).fill().map(x => [ faker.name.firstName(), faker.name.lastName(), faker.internet.email(), ]) });

The parent column header "Test" does not cover the full table.

Expected behavior In the above example, the parent column header "Test" should span across the full table

Screenshots See attached screenshot Screenshot from 2024-05-13 09-08-07

Additional context I really like the nested header feature.

I updated the initial post with an better example

ecofi avatar May 13 '24 07:05 ecofi