pub struct TableProps {Show 29 fields
pub columns: Vec<TableColumn>,
pub data: Vec<Value>,
pub row_key_field: Option<String>,
pub row_class_name: Option<String>,
pub row_class_name_fn: Option<RowClassNameFn>,
pub row_props_fn: Option<RowPropsFn>,
pub bordered: bool,
pub size: Option<ComponentSize>,
pub loading: bool,
pub is_empty: Option<bool>,
pub empty: Option<Element>,
pub row_selection: Option<RowSelection>,
pub scroll: Option<TableScroll>,
pub sticky: Option<StickyConfig>,
pub expandable: Option<ExpandableConfig>,
pub summary: Option<SummaryConfig>,
pub on_change: Option<EventHandler<TableChangeEvent>>,
pub get_popup_container: Option<String>,
pub virtual: bool,
pub locale: Option<TableLocale>,
pub show_header: bool,
pub class: Option<String>,
pub style: Option<String>,
pub class_names: Option<TableClassNames>,
pub styles: Option<TableStyles>,
pub pagination_total: Option<u32>,
pub pagination_current: Option<u32>,
pub pagination_page_size: Option<u32>,
pub pagination_on_change: Option<EventHandler<(u32, u32)>>,
}Expand description
Props for the Table component.
Fields§
§columns: Vec<TableColumn>Column definitions.
data: Vec<Value>Row data as JSON values.
row_key_field: Option<String>Field used as row key.
row_class_name: Option<String>Extra class applied to each row (static).
row_class_name_fn: Option<RowClassNameFn>Dynamic row class name function: (record, index) -> Option
row_props_fn: Option<RowPropsFn>Dynamic row props function: (record, index) -> HashMap<String, String>
bordered: boolWhether to show outer borders.
size: Option<ComponentSize>Visual density.
loading: boolLoading state.
is_empty: Option<bool>Whether the table is currently empty.
empty: Option<Element>Custom empty node.
row_selection: Option<RowSelection>Row selection configuration.
scroll: Option<TableScroll>Scroll configuration.
sticky: Option<StickyConfig>Sticky header configuration.
expandable: Option<ExpandableConfig>Expandable row configuration.
summary: Option<SummaryConfig>Summary row configuration.
on_change: Option<EventHandler<TableChangeEvent>>Called when pagination, filters or sorter changes.
get_popup_container: Option<String>Custom container for popups (dropdowns, filters, etc.). Function that takes trigger node and returns container element. In Rust, this is simplified to a container selector string.
virtual: boolEnable virtual scrolling for large datasets.
locale: Option<TableLocale>Locale configuration for table text.
show_header: boolShow table header.
class: Option<String>§style: Option<String>§class_names: Option<TableClassNames>Semantic class names.
styles: Option<TableStyles>Semantic styles.
pagination_total: Option<u32>§pagination_current: Option<u32>§pagination_page_size: Option<u32>§pagination_on_change: Option<EventHandler<(u32, u32)>>Implementations§
Source§impl TableProps
impl TableProps
Sourcepub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TableProps.
On the builder, call .columns(...), .data(...), .row_key_field(...)(optional), .row_class_name(...)(optional), .row_class_name_fn(...)(optional), .row_props_fn(...)(optional), .bordered(...)(optional), .size(...)(optional), .loading(...)(optional), .is_empty(...)(optional), .empty(...)(optional), .row_selection(...)(optional), .scroll(...)(optional), .sticky(...)(optional), .expandable(...)(optional), .summary(...)(optional), .on_change(...)(optional), .get_popup_container(...)(optional), .r#virtual(...)(optional), .locale(...)(optional), .show_header(...)(optional), .class(...)(optional), .style(...)(optional), .class_names(...)(optional), .styles(...)(optional), .pagination_total(...)(optional), .pagination_current(...)(optional), .pagination_page_size(...)(optional), .pagination_on_change(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TableProps.
Trait Implementations§
Source§impl Clone for TableProps
impl Clone for TableProps
Source§fn clone(&self) -> TableProps
fn clone(&self) -> TableProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more