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

RowSpan extra column #269

Closed
markmadlangbayan opened this issue Mar 14, 2022 · 1 comment · Fixed by #278
Closed

RowSpan extra column #269

markmadlangbayan opened this issue Mar 14, 2022 · 1 comment · Fixed by #278
Labels
bug Something isn't working

Comments

@markmadlangbayan
Copy link

My intention is to produce a table that looks like this:

┌────┬────┬────┐
│ A1 │ B1 │ C1 │
│    ├────┼────┤
│    │ B2 │ C2 │
│    │    ├────┤
│    │    │ C3 │ 
└────┴────┴────┘

For some reason, it looks like this:

┌────┬────┬────┐
│ A1 │ B1 │ C1 │
│    ├────┼────┤
│    │ B2 │ C2 │
│    │    ├────├────┤
│    │    │ C3 │    │
└────┴────┴────┴────┘
    const tbl = new Table();
    tbl.push([ { rowSpan: 3, content: 'A1' }, 'B1', 'C1'], 
             [ { rowSpan: 2, content: 'B2' }, 'C2'],
             ['C3']);
    console.log(tbl.toString());

I can remove the extra column in this example by making the third row an empty array, but I do need to display 'C3'.

I saw PR 187, so I thought it is already fixed. I verified that I have the code, but still getting that extra column.

@speedytwenty
Copy link
Collaborator

Thanks for the detailed explanation and providing code to quickly reproduce the issue. While I haven't found a solution yet, I have discovered the problem. When the C3 cell is checked, it's X results as "1" when it should result as "2". I'll try to take another stab at it when time permits.

@speedytwenty speedytwenty added the bug Something isn't working label Mar 25, 2022
speedytwenty added a commit to speedytwenty/cli-table3 that referenced this issue Mar 27, 2022
speedytwenty added a commit to speedytwenty/cli-table3 that referenced this issue Mar 27, 2022
@speedytwenty speedytwenty linked a pull request Mar 27, 2022 that will close this issue
speedytwenty added a commit to speedytwenty/cli-table3 that referenced this issue Mar 27, 2022
speedytwenty added a commit to speedytwenty/cli-table3 that referenced this issue Mar 30, 2022
speedytwenty added a commit to speedytwenty/cli-table3 that referenced this issue Mar 30, 2022
speedytwenty added a commit that referenced this issue Apr 1, 2022
* #269 - Failing tests for refactored table layouts
* #269 - Refactored table layouts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants