Skip to main content

Table

Function Table 

Source
pub fn Table(_: TableProps) -> Element
Expand description

A table in a focusable, named scroll region, with optional sorting.

Only the sorted column carries aria-sort, so screen readers do not announce “not sorted” on every other header; the arrow and emphasis come from the same attribute.

§Props

For details, see the props struct definition.

  • caption : Element

    The caption, which also names the scroll region.

  • caption_hidden : bool

    Hide the caption visually; it still names the table and region.

  • columns : Vec<TableColumn>
  • rows : Vec<TableRow>
  • sort : Option<ReadSignal<Option<(usize,SortDirection)>>>
  • default_sort : Option<(usize,SortDirection)>
  • onsort : Option<EventHandler<(usize,SortDirection)>>
  • mode : SortMode
  • striped : bool
  • compact : bool
  • sticky : bool

    Keep the header in view while the body scrolls.

  • busy : bool

    Rows are loading.

  • empty : Option<Element>

    Shown across the table when there are no rows.

  • class : Option<String>
  • attributes : Vec<Attribute>