pub struct TableProps {Show 15 fields
pub caption: Element,
pub caption_hidden: bool,
pub columns: Vec<TableColumn>,
pub rows: Vec<TableRow>,
pub sort: Option<ReadSignal<Option<(usize, SortDirection)>>>,
pub default_sort: Option<(usize, SortDirection)>,
pub onsort: Option<EventHandler<(usize, SortDirection)>>,
pub mode: SortMode,
pub striped: bool,
pub compact: bool,
pub sticky: bool,
pub busy: bool,
pub empty: Option<Element>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Properties for the Table component.
Fields§
§caption: ElementThe caption, which also names the scroll region.
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: boolKeep the header in view while the body scrolls.
busy: boolRows are loading.
empty: Option<Element>Shown across the table when there are no rows.
class: Option<String>§attributes: Vec<Attribute>Implementations§
Source§impl TableProps
impl TableProps
Sourcepub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TableProps.
On the builder, call .caption(...), .caption_hidden(...)(optional), .columns(...), .rows(...), .sort(...)(optional), .default_sort(...)(optional), .onsort(...)(optional), .mode(...)(optional), .striped(...)(optional), .compact(...)(optional), .sticky(...)(optional), .busy(...)(optional), .empty(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TableProps.