Datatables Interface

class epyk.interfaces.tables.CompDatatable.Datatables(ui)
table(records=None, cols: Optional[list] = None, rows: Optional[list] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)

Create a generic DataTable table.

Tags:

Categories:

Usage:

dtt = page.ui.tables.datatables.table(cols=["test"])
page.ui.button("Update").click([dt.build([["row %s" % i] for i in range(n)])])
Parameters:
  • records – Optional. The list of dictionaries with the input data.

  • cols – Optional. The list of key from the record to be used as columns in the table.

  • rows – Optional. The list of key from the record to be used as rows in the table.

  • width – Optional. The width of the component in the page, default (100, ‘%’)

  • height – Optional. The height of the component in the page, default (330, “px”)

  • html_code – Optional. An identifier for this component (on both Python and Javascript side).

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.