Skip to content
Discussion options

You must be logged in to vote

I finally got this figured out.

Given the format of a data table as follows:

ft.DataTable(
        columns=[
            ft.DataColumn(ft.Text("Peer Name")),
            ft.DataColumn(ft.Text("IP Address")),
            ft.DataColumn(ft.Text("SSH Enabled")),
            ft.DataColumn(ft.Text("Status")),
            ft.DataColumn(ft.Text("Groups")),
        ],
        rows=get_row_data,
    ),

Where get_row_data returns all the rows in the format:

row_data.append(ft.DataRow(
    cells=[
        ft.DataCell(ft.Text(items["hostname"]), on_tap=cell_tapped),
        ft.DataCell(ft.Text(items["ip"]), on_tap=copy_ip),
        ft.DataCell(ssh, on_tap=toggle_ssh),
        ft.DataCell(conn, on_tap…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
1 participant