mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #381] Help: show modal dialog on table view #281
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#281
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 @labkode on GitHub (Dec 25, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/381
I'm creating an application based on the presentation tview demo.
I'm reusing the table code for one of the pages and I want that when I click 'e' on one of the table rows a modal appears to modify the row. I've done the logic capture the key event and perform any action but the modal is not showing.
Thanks and Happy Christmas!
@Bios-Marcel commented on GitHub (Dec 25, 2019):
The modal is just a primitive (Widget), you actually have to set it as the root layout primitive using Application#SetRoot.
@labkode commented on GitHub (Dec 25, 2019):
@Bios-Marcel that would break the existing layout.
@Bios-Marcel commented on GitHub (Dec 25, 2019):
Drawing things ontop of other things isn't supported afaik.
@labkode commented on GitHub (Dec 26, 2019):
@Bios-Marcel is possible I just managed. The magic is to set the current view as the background of the modal.
Is explained here: https://github.com/rivo/tview/wiki/Modal
@Bios-Marcel commented on GitHub (Dec 26, 2019):
Oh cool, guess I learned something then, thanks ^^
@agruenberg commented on GitHub (Jan 23, 2020):
Or you use pages, where you put the modal on top most.
@LazarenkoA commented on GitHub (Jul 15, 2020):
Hi. I have a similar task, can you share the code? Have you used Pages (as in the demo)?
@LazarenkoA commented on GitHub (Jul 15, 2020):
made it using Pages