pub struct SortTableState { /* private fields */ }Implementations§
Source§impl SortTableState
impl SortTableState
pub fn new( headers: Vec<String>, data: Vec<SortableRow>, current_sort_index: Signal<usize>, ) -> Self
pub fn set_sorted_col_index(&mut self, sorted_col_index: usize)
pub fn get_sorted_col_index(&self) -> usize
pub fn reverse_data(&mut self)
pub fn toggle_sort_direction(&mut self)
pub fn set_sort_direction(&mut self, ascending: bool)
pub fn is_sort_ascending(&self) -> bool
Sourcepub fn set_default_sort(self, column_name: Option<String>) -> Self
pub fn set_default_sort(self, column_name: Option<String>) -> Self
Set the default sort column based on its name
If None or the column is not found, the first column will be sorted
Else, the column will be
Auto Trait Implementations§
impl Freeze for SortTableState
impl !RefUnwindSafe for SortTableState
impl !Send for SortTableState
impl !Sync for SortTableState
impl Unpin for SortTableState
impl !UnwindSafe for SortTableState
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.