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>>,
}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)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.