JxDataTable class

A data table: caption, column headers, striped rows, numeric alignment, sortable headers, a sticky header and an empty state.

Rows hold components, so a cell can be text, a JxBadge or a button. Sorting and paging are yours: onSort reports the clicked column, and JxPagination moves between pages.

Constructors

JxDataTable({required List<JxColumn> columns, required List<List<Component>> rows, String? caption, bool striped = true, bool hover = true, bool dense = false, bool stickyHeader = false, int? sortColumn, bool sortAscending = true, ValueChanged<int>? onSort, String emptyText = 'No data', String? classes, Key? key})
const

Properties

caption → String?
Title of the table, read first by screen readers.
final
classes → String?
final
columns → List<JxColumn>
final
dense → bool
final
emptyText → String
Shown in a single row when rows is empty.
final
hashCode → int
The hash code for this object.
no setterinherited
hover → bool
final
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
onSort → ValueChanged<int>?
final
rows → List<List<Component>>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sortAscending → bool
final
sortColumn → int?
Index of the column the rows are sorted by (aria-sort).
final
Keeps the header visible while the table scrolls (max height 28rem).
final
striped → bool
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited