[GH-ISSUE #297] Export ListItems for easier state control #227

Closed
opened 2026-03-04 01:03:09 +03:00 by kerem · 2 comments
Owner

Originally created by @diamondburned on GitHub (Jun 8, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/297

https://github.com/rivo/tview/blob/master/list.go#L25 could be exported along with *listItems, I don't see why not. Being able to modify individual list entries make it easier to control the state for reactive UI.

Originally created by @diamondburned on GitHub (Jun 8, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/297 https://github.com/rivo/tview/blob/master/list.go#L25 could be exported along with `*listItem`s, I don't see why not. Being able to modify individual list entries make it easier to control the state for reactive UI.
kerem closed this issue 2026-03-04 01:03:09 +03:00
Author
Owner

@diamondburned commented on GitHub (Jun 8, 2019):

P/S on an unrelated topic: I feel like a lot of the things in tview has no reasons to not be exported.

<!-- gh-comment-id:500132899 --> @diamondburned commented on GitHub (Jun 8, 2019): P/S on an unrelated topic: I feel like a *lot* of the things in `tview` has no reasons to not be exported.
Author
Owner

@rivo commented on GitHub (Jul 5, 2019):

It's simple. Information hiding. I made a mistake already in exposing too much implementation and it limits my ability to add new features in some cases. But due to backwards compatibility, I'm not fixing that.

Maybe in the case of listItem, there is an opportunity to bring it in line with, say, TreeNode. But I want to see an actual problem from an actual application first where this would be the best solution.

<!-- gh-comment-id:508722789 --> @rivo commented on GitHub (Jul 5, 2019): It's simple. Information hiding. I made a mistake already in exposing too much implementation and it limits my ability to add new features in some cases. But due to backwards compatibility, I'm not fixing that. Maybe in the case of `listItem`, there is an opportunity to bring it in line with, say, `TreeNode`. But I want to see an actual problem from an actual application first where this would be the best solution.
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#227
No description provided.