mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1127] Flex: add a method to remove an item #816
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#816
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?
Originally created by @ossenthusiast on GitHub (Oct 11, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1127
I wanna add the ability to hide the "sidebar" in my app, currently, I am removing everything and rebuilding the entire layout... it would be awesome if there was a way to remove the primitive from the flex and insert it back later.
@MonkeyMatrix commented on GitHub (Oct 19, 2025):
You may be able to use fixedSize/proportion for flex items to help with that.
If you run this, you should be able to press 'u' and 'd' to show and hide the
textTextView. If you do need to remove an item,RemoveItemdoes exist. I only need to resize in the above code by setting proportion to 0, but your structure might need a different solution.