mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[PR #991] [CLOSED] fix(grid): order of adding items should not affect drawing #1098
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1098
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/991
Author: @darylhjd
Created: 5/24/2024
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
8b81388fix(grid): order of adding items should not affect drawing📊 Changes
1 file changed (+5 additions, -5 deletions)
View changed files
📝
grid.go(+5 -5)📄 Description
This PR is related to https://github.com/rivo/tview/issues/987
It seems that the order of adding items into the grid affects the result of the drawing.
This behaviour can be seen with the following example:
We expect the table to be shown differently based on the minimum widths and heights provided.


However, this is what we actually get - the table is shown twice in the large width view.


Strangely, if you change the order of adding of items to the grid, this unexpected behaviour disappears:
It seems that using a
mapfixes this. This was also the original data structure used beforegithub.com/rivo/tview@33a1d271f2. No other logic is changed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.