mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1078] Can I switch pages multiple times within SelectedFunc? #782
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#782
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 @ryutaro-asada on GitHub (Mar 22, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1078
Hello.
i have a question.
I want to show a loading modal when I select a table row, so I wrote the following code:
However, it seems like the modal is not shown.
I think the reason is that the modal is shown and hidden at the same time.
How can I show the modal before the setLogStreamToGui function is called?
@rivo commented on GitHub (Mar 27, 2025):
Redrawing happens after the
selectedFuncis done. So you're basically showing a page, then hiding it again beforetviewredraws the screen. That's why you don't see anything.I don't know what your
setLogStreamToGuifunction does but if it takes a while and you don't mind your application being unresponsive during its execution, you can useApplication.QueueUpdateDrawto callsetLogStreamToGuiandHidePage.If your application needs to be responsive while
setLogStreamToGuiexecutes, that's a bit trickier. You might want to read the following Wiki page to get some clues: https://github.com/rivo/tview/wiki/Concurrency@ryutaro-asada commented on GitHub (Mar 28, 2025):
Thank you .