[PR #308] [MERGED] Don't throw away nodes after drawing #905

Closed
opened 2026-03-04 01:08:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/308
Author: @ollien
Created: 6/16/2019
Status: Merged
Merged: 6/26/2019
Merged by: @rivo

Base: masterHead: fix-row-count


📝 Commits (1)

  • a186f0a Don't throw away nodes after drawing TreeView

📊 Changes

1 file changed (+1 additions, -7 deletions)

View changed files

📝 treeview.go (+1 -7)

📄 Description

Currently, a tree's nodes are thrown away after drawing a TreeView, and then reprocessed on every Draw. This causes GetRowCount to always return 0 from the TreeView. This PR fixes that problem by simply preserving the nodes between draws.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/308 **Author:** [@ollien](https://github.com/ollien) **Created:** 6/16/2019 **Status:** ✅ Merged **Merged:** 6/26/2019 **Merged by:** [@rivo](https://github.com/rivo) **Base:** `master` ← **Head:** `fix-row-count` --- ### 📝 Commits (1) - [`a186f0a`](https://github.com/rivo/tview/commit/a186f0a9094ecc733ace6ab0be222b4437eb70c3) Don't throw away nodes after drawing TreeView ### 📊 Changes **1 file changed** (+1 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `treeview.go` (+1 -7) </details> ### 📄 Description Currently, a tree's nodes are thrown away after drawing a `TreeView`, and then reprocessed on every Draw. This causes `GetRowCount` to always return 0 from the `TreeView`. This PR fixes that problem by simply preserving the nodes between draws. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:30 +03:00
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#905
No description provided.