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

colspan and rowspan broken are broken ? #2799

Open
brignolij opened this issue Oct 10, 2024 · 1 comment
Open

colspan and rowspan broken are broken ? #2799

brignolij opened this issue Oct 10, 2024 · 1 comment

Comments

@brignolij
Copy link

brignolij commented Oct 10, 2024

Hello,

I found some weird behavior when playing with table and colspan and rowspan

Here a example using the playground (0.2.14)

var dd = {
    content: [
        {
            table: {
                widths: [120, 120, 100, '*'],
                body: [
                    // Table header
                    [{text:'Header  a a a a a a a a a a a a a  a a a a a ',rowSpan:2},
                    {text:'Header  a a a a a a a a a a a a a  a a a a a ',rowSpan:2},
                    {text:'TestVal2  a a a ',colSpan:2,rowSpan:1}, ''],
                    
                    // Table rows
                    ['', '', '', 'Value 4'],
                    [{text:'Header  a a a a a a a a a a a a a  a a a a a ',colSpan:2}, '', 'Value 3', 'Value 4'],
                    ['Row 3', 'Sample value', 'Another sample', 'Another sample']
                ]
            }
        }
    ]
};

using Colspan:2 near TestVal2 make the display take two row, instead of one. It take effectively 2 columns. Why ?
How can i avoid this weird behavior, is it a bug ?

colspan_bug

I have big templates in production that are broken because of this issue.

@fe-cj
Copy link
Contributor

fe-cj commented Oct 14, 2024

It seems this bug was introduced with PR #2764. I will try to look into it.

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

No branches or pull requests

3 participants