pub struct UseTableHandle<T: Clone + 'static> { /* private fields */ }Expand description
Handle returned by use_table hook.
Implementations§
Source§impl<T: Clone + 'static> UseTableHandle<T>
impl<T: Clone + 'static> UseTableHandle<T>
Sourcepub fn visible_rows(&self) -> Vec<DataTableRow<T>>
pub fn visible_rows(&self) -> Vec<DataTableRow<T>>
Returns the visible rows after processing.
Sourcepub fn visible_column_ids(&self) -> Vec<ColumnId>
pub fn visible_column_ids(&self) -> Vec<ColumnId>
Returns the visible column IDs in order.
Sourcepub fn visible_columns(&self) -> Vec<ColumnId>
pub fn visible_columns(&self) -> Vec<ColumnId>
Returns visible columns.
Sourcepub fn get_column_header(&self, id: &ColumnId) -> Option<String>
pub fn get_column_header(&self, id: &ColumnId) -> Option<String>
Gets column header by ID.
Sourcepub fn is_column_sortable(&self, id: &ColumnId) -> bool
pub fn is_column_sortable(&self, id: &ColumnId) -> bool
Gets whether a column is sortable.
Sourcepub fn get_cell_value(&self, row: &T, column_id: &ColumnId) -> Option<String>
pub fn get_cell_value(&self, row: &T, column_id: &ColumnId) -> Option<String>
Gets value from a row for a column.
Sourcepub fn total_row_count(&self) -> usize
pub fn total_row_count(&self) -> usize
Returns the total number of rows.
Sourcepub fn filtered_row_count(&self) -> usize
pub fn filtered_row_count(&self) -> usize
Returns the number of filtered rows.
Sourcepub fn page_row_count(&self) -> usize
pub fn page_row_count(&self) -> usize
Returns the number of rows on the current page.
Sourcepub fn state(&self) -> DataTableState
pub fn state(&self) -> DataTableState
Returns the current table state.
Sourcepub fn toggle_sort(&self, column_id: impl Into<ColumnId>, multi: bool)
pub fn toggle_sort(&self, column_id: impl Into<ColumnId>, multi: bool)
Toggles sorting for a column.
Sourcepub fn set_column_filter(
&self,
column_id: impl Into<ColumnId>,
value: impl Into<String>,
)
pub fn set_column_filter( &self, column_id: impl Into<ColumnId>, value: impl Into<String>, )
Sets a column filter.
Sourcepub fn set_global_filter(&self, value: impl Into<String>)
pub fn set_global_filter(&self, value: impl Into<String>)
Sets the global filter.
Sourcepub fn toggle_row_selection(&self, row_id: DataTableRowId)
pub fn toggle_row_selection(&self, row_id: DataTableRowId)
Toggles row selection.
Sourcepub fn select_all_rows(&self)
pub fn select_all_rows(&self)
Selects all rows.
Sourcepub fn clear_selection(&self)
pub fn clear_selection(&self)
Clears row selection.
Sourcepub fn toggle_row_expansion(&self, row_id: DataTableRowId)
pub fn toggle_row_expansion(&self, row_id: DataTableRowId)
Toggles row expansion.
Sourcepub fn toggle_column_visibility(&self, column_id: ColumnId)
pub fn toggle_column_visibility(&self, column_id: ColumnId)
Toggles column visibility.
Sourcepub fn go_to_page(&self, page: usize)
pub fn go_to_page(&self, page: usize)
Goes to a specific page (0-indexed).
Sourcepub fn previous_page(&self)
pub fn previous_page(&self)
Goes to the previous page.
Sourcepub fn set_page_size(&self, size: usize)
pub fn set_page_size(&self, size: usize)
Sets the page size.
Sourcepub fn is_row_selected(&self, row_id: &DataTableRowId) -> bool
pub fn is_row_selected(&self, row_id: &DataTableRowId) -> bool
Returns whether a row is selected.
Sourcepub fn is_row_expanded(&self, row_id: &DataTableRowId) -> bool
pub fn is_row_expanded(&self, row_id: &DataTableRowId) -> bool
Returns whether a row is expanded.
Sourcepub fn is_column_visible(&self, column_id: &ColumnId) -> bool
pub fn is_column_visible(&self, column_id: &ColumnId) -> bool
Returns whether a column is visible.
Sourcepub fn current_page(&self) -> usize
pub fn current_page(&self) -> usize
Returns the current page index (0-indexed).
Sourcepub fn page_count(&self) -> usize
pub fn page_count(&self) -> usize
Returns the total number of pages.
Sourcepub fn can_previous_page(&self) -> bool
pub fn can_previous_page(&self) -> bool
Returns whether there is a previous page.
Sourcepub fn can_next_page(&self) -> bool
pub fn can_next_page(&self) -> bool
Returns whether there is a next page.
Sourcepub fn get_sort_direction(&self, column_id: &ColumnId) -> Option<SortDirection>
pub fn get_sort_direction(&self, column_id: &ColumnId) -> Option<SortDirection>
Gets the sort direction for a column.
Sourcepub fn get_sort_index(&self, column_id: &ColumnId) -> Option<usize>
pub fn get_sort_index(&self, column_id: &ColumnId) -> Option<usize>
Gets the sort index for a column (for multi-sort).
Sourcepub fn data_version(&self) -> u32
pub fn data_version(&self) -> u32
Returns the current data version (incremented on each data change).
Trait Implementations§
Source§impl<T: Clone + Clone + 'static> Clone for UseTableHandle<T>
impl<T: Clone + Clone + 'static> Clone for UseTableHandle<T>
Source§fn clone(&self) -> UseTableHandle<T>
fn clone(&self) -> UseTableHandle<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Clone + 'static> PartialEq for UseTableHandle<T>
impl<T: Clone + 'static> PartialEq for UseTableHandle<T>
Auto Trait Implementations§
impl<T> !Freeze for UseTableHandle<T>
impl<T> !RefUnwindSafe for UseTableHandle<T>
impl<T> !Send for UseTableHandle<T>
impl<T> !Sync for UseTableHandle<T>
impl<T> Unpin for UseTableHandle<T>
impl<T> UnsafeUnpin for UseTableHandle<T>
impl<T> !UnwindSafe for UseTableHandle<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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
self to a value of a Properties struct.