mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #1086] Missing API method to retrieve a page from a Pages set #789
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#789
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 @jsumners-nr on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1086
There's methods for getting the names of pages, removing pages, and determining if the set contains a specific page, but there isn't a method for retrieving a page by name. This seems like an oversight?
As an example, I have an app (
github.com/newrelic/node-log-viewer@8a59279cda) that uses pages for all of the different views of the app. I want to reset a page to its default state after it has been used. Specifically, there's a search page that has an input field and two buttons (search and cancel). After a user issues a search, and then re-opens the search page to perform another search, the previous state will be shown. In my current structure, I believe that I need to be able to retrieve the search page from the set of pages so that I can reset the field value and issue a.SetFocuson it. But I can't do that with the current API. So I think I'm going to have to restructure my app to separate the form from the "page".(if you want to try that app to see what I mean, there's a sample log file in
testdata/v0/that can be used)@rivo commented on GitHub (Aug 27, 2025):
See the commit linked above.
This was just never requested.
@jsumners-nr commented on GitHub (Aug 27, 2025):
Excellent. Thank you.