pub struct DataTableState {
pub selected_rows: Vec<bool>,
pub header_checkbox: bool,
pub column_sorts: HashMap<String, SortDirection>,
pub sorted_column: Option<usize>,
pub sort_direction: SortDirection,
pub editing_rows: HashSet<usize>,
pub edit_data: HashMap<usize, Vec<String>>,
pub drawer_open_rows: HashSet<usize>,
}Expand description
Persistent state for a Material Design data table.
This structure maintains the state of the table including selections, sorting, and editing state across frames.
Fields§
§selected_rows: Vec<bool>Selection state for each row (true if selected)
header_checkbox: boolState of the header checkbox (for select-all functionality)
column_sorts: HashMap<String, SortDirection>Sort states for each column by column name
sorted_column: Option<usize>Index of the currently sorted column (if any)
sort_direction: SortDirectionCurrent sort direction for the sorted column
editing_rows: HashSet<usize>Set of row indices currently being edited
edit_data: HashMap<usize, Vec<String>>Temporary edit data for rows being edited (row_index -> cell_values)
drawer_open_rows: HashSet<usize>Set of row indices with their drawer expanded
Trait Implementations§
Source§impl Clone for DataTableState
impl Clone for DataTableState
Source§fn clone(&self) -> DataTableState
fn clone(&self) -> DataTableState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataTableState
impl Debug for DataTableState
Source§impl Default for DataTableState
impl Default for DataTableState
Source§fn default() -> DataTableState
fn default() -> DataTableState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DataTableState
impl<'de> Deserialize<'de> for DataTableState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataTableState
impl RefUnwindSafe for DataTableState
impl Send for DataTableState
impl Sync for DataTableState
impl Unpin for DataTableState
impl UnsafeUnpin for DataTableState
impl UnwindSafe for DataTableState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more