Skip to content

Class peagen.tui.components.task_table.TaskTable

peagen.tui.components.task_table.TaskTable

TaskTable(open_cb, **kwargs)

Bases: DataTable

Data table that opens task details on double-click.

Initialize the table.

PARAMETER DESCRIPTION
open_cb

Coroutine called with the task ID when a row is double-clicked.

TYPE: Callable[[str], Awaitable[None]]

**kwargs

Forwarded to DataTable.

DEFAULT: {}

Source code in peagen/tui/components/task_table.py
15
16
17
18
19
20
21
22
23
def __init__(self, open_cb: Callable[[str], Awaitable[None]], **kwargs) -> None:
    """Initialize the table.

    Args:
        open_cb: Coroutine called with the task ID when a row is double-clicked.
        **kwargs: Forwarded to ``DataTable``.
    """
    super().__init__(**kwargs)
    self._open_cb = open_cb