pub struct RowSelectionState { /* private fields */ }Expand description
Complete row selection state for the table.
Tracks selected rows and provides methods for selection management with mode-aware behavior.
Implementations§
Source§impl RowSelectionState
impl RowSelectionState
Sourcepub fn new() -> RowSelectionState
pub fn new() -> RowSelectionState
Creates a new empty selection state.
§Returns
RowSelectionState: A new multi-selection state with row click enabled.
Sourcepub fn with_mode(mode: RowSelectionMode) -> RowSelectionState
pub fn with_mode(mode: RowSelectionMode) -> RowSelectionState
Sourcepub fn with_row_click(self, enable: bool) -> RowSelectionState
pub fn with_row_click(self, enable: bool) -> RowSelectionState
Sourcepub fn with_sub_row_selection(self, enable: bool) -> RowSelectionState
pub fn with_sub_row_selection(self, enable: bool) -> RowSelectionState
Sourcepub fn mode(&self) -> RowSelectionMode
pub fn mode(&self) -> RowSelectionMode
Sourcepub fn is_row_click_enabled(&self) -> bool
pub fn is_row_click_enabled(&self) -> bool
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Sourcepub fn is_selected(&self, row_id: &DataTableRowId) -> bool
pub fn is_selected(&self, row_id: &DataTableRowId) -> bool
Sourcepub fn selected_count(&self) -> usize
pub fn selected_count(&self) -> usize
Sourcepub fn has_selection(&self) -> bool
pub fn has_selection(&self) -> bool
Sourcepub fn selected_ids(&self) -> impl Iterator<Item = &DataTableRowId>
pub fn selected_ids(&self) -> impl Iterator<Item = &DataTableRowId>
Returns the selected row IDs.
§Returns
impl Iterator<Item = &DataTableRowId>: An iterator over selected row IDs.
Sourcepub fn selected_ids_vec(&self) -> Vec<DataTableRowId>
pub fn selected_ids_vec(&self) -> Vec<DataTableRowId>
Returns the selected row IDs as a vector.
§Returns
Vec<DataTableRowId>: A vector of selected row IDs.
Sourcepub fn is_all_selected(&self, row_ids: &[DataTableRowId]) -> bool
pub fn is_all_selected(&self, row_ids: &[DataTableRowId]) -> bool
Sourcepub fn is_some_selected(&self, row_ids: &[DataTableRowId]) -> bool
pub fn is_some_selected(&self, row_ids: &[DataTableRowId]) -> bool
Sourcepub fn select(&mut self, row_id: DataTableRowId)
pub fn select(&mut self, row_id: DataTableRowId)
Sourcepub fn deselect(&mut self, row_id: &DataTableRowId)
pub fn deselect(&mut self, row_id: &DataTableRowId)
Sourcepub fn toggle(&mut self, row_id: DataTableRowId)
pub fn toggle(&mut self, row_id: DataTableRowId)
Sourcepub fn select_many(&mut self, row_ids: impl IntoIterator<Item = DataTableRowId>)
pub fn select_many(&mut self, row_ids: impl IntoIterator<Item = DataTableRowId>)
Sourcepub fn deselect_many(
&mut self,
row_ids: impl IntoIterator<Item = DataTableRowId>,
)
pub fn deselect_many( &mut self, row_ids: impl IntoIterator<Item = DataTableRowId>, )
Sourcepub fn select_all(&mut self, row_ids: impl IntoIterator<Item = DataTableRowId>)
pub fn select_all(&mut self, row_ids: impl IntoIterator<Item = DataTableRowId>)
Sourcepub fn toggle_all(&mut self, row_ids: Vec<DataTableRowId>)
pub fn toggle_all(&mut self, row_ids: Vec<DataTableRowId>)
Sourcepub fn set_mode(&mut self, mode: RowSelectionMode)
pub fn set_mode(&mut self, mode: RowSelectionMode)
Trait Implementations§
Source§impl Clone for RowSelectionState
impl Clone for RowSelectionState
Source§fn clone(&self) -> RowSelectionState
fn clone(&self) -> RowSelectionState
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 RowSelectionState
impl Debug for RowSelectionState
Source§impl Default for RowSelectionState
impl Default for RowSelectionState
Source§fn default() -> RowSelectionState
fn default() -> RowSelectionState
Returns the “default value” for a type. Read more
Source§impl PartialEq for RowSelectionState
impl PartialEq for RowSelectionState
impl Eq for RowSelectionState
impl StructuralPartialEq for RowSelectionState
Auto Trait Implementations§
impl Freeze for RowSelectionState
impl RefUnwindSafe for RowSelectionState
impl Send for RowSelectionState
impl Sync for RowSelectionState
impl Unpin for RowSelectionState
impl UnsafeUnpin for RowSelectionState
impl UnwindSafe for RowSelectionState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.