[GH-ISSUE #736] Table.RemoveColumn() does not update lastColumn #538

Closed
opened 2026-03-04 01:05:51 +03:00 by kerem · 1 comment
Owner

Originally created by @cespedes on GitHub (Jun 24, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/736

When removing a column in a table by calling RemoveColumn(), even if the removal is successful, the table continues to have the same number of columns.

A simple fix is to include these lines at the end of func (t *tableDefaultContent) RemoveColumn (table.go line 332):

if column <= t.lastColumn {
        t.lastColumn--
}

I can prepare a pull request if you prefer.

Originally created by @cespedes on GitHub (Jun 24, 2022). Original GitHub issue: https://github.com/rivo/tview/issues/736 When removing a column in a table by calling RemoveColumn(), even if the removal is successful, the table continues to have the same number of columns. A simple fix is to include these lines at the end of `func (t *tableDefaultContent) RemoveColumn` (table.go line 332): if column <= t.lastColumn { t.lastColumn-- } I can prepare a pull request if you prefer.
kerem closed this issue 2026-03-04 01:05:51 +03:00
Author
Owner

@rivo commented on GitHub (Nov 13, 2022):

Thank you! It's fixed now.

<!-- gh-comment-id:1312788551 --> @rivo commented on GitHub (Nov 13, 2022): Thank you! It's fixed now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#538
No description provided.