pub struct TableProps {Show 17 fields
pub columns: Vec<TableColumn>,
pub data: TableData,
pub height: Option<String>,
pub max_height: Option<String>,
pub show_header: bool,
pub border: bool,
pub stripe: bool,
pub highlight_current_row: bool,
pub loading: bool,
pub empty_text: String,
pub sort_key: Option<String>,
pub sort_order: SortOrder,
pub current_row_index: Option<usize>,
pub on_row_click: Option<EventHandler<usize>>,
pub on_sort_change: Option<EventHandler<(String, SortOrder)>>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Table props
Fields§
§columns: Vec<TableColumn>Table columns
data: TableDataTable data
height: Option<String>Table height
max_height: Option<String>Table max height
show_header: boolWhether to show header
border: boolWhether to show border
stripe: boolWhether to show stripe effect
highlight_current_row: boolWhether to highlight current row
loading: boolWhether table is loading
empty_text: StringEmpty state text
sort_key: Option<String>Current sort column key
sort_order: SortOrderCurrent sort order
current_row_index: Option<usize>Current highlighted row index
on_row_click: Option<EventHandler<usize>>Row click handler
on_sort_change: Option<EventHandler<(String, SortOrder)>>Sort change handler
class: Option<String>Additional CSS classes
style: Option<String>Inline styles
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(...), .height(...)(optional), .max_height(...)(optional), .show_header(...)(optional), .border(...)(optional), .stripe(...)(optional), .highlight_current_row(...)(optional), .loading(...)(optional), .empty_text(...)(optional), .sort_key(...)(optional), .sort_order(...)(optional), .current_row_index(...)(optional), .on_row_click(...)(optional), .on_sort_change(...)(optional), .class(...)(optional), .style(...)(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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for TableProps
impl PartialEq for TableProps
Source§fn eq(&self, other: &TableProps) -> bool
fn eq(&self, other: &TableProps) -> bool
self and other values to be equal, and is used by ==.