pub struct DataTableHeaderContext {
pub column_id: ColumnId,
pub column_index: usize,
pub is_sorted: bool,
pub sort_direction: Option<DataTableSortDirection>,
pub sort_index: Option<usize>,
pub can_sort: bool,
pub can_filter: bool,
pub can_resize: bool,
pub is_pinned: bool,
pub width: Option<f64>,
}Expand description
Context provided when rendering a column header.
Contains sort state, filter capability, resize state, pinning status, and column width information.
Fields§
§column_id: ColumnIdThe column ID.
column_index: usizeThe column index.
is_sorted: boolWhether the column is currently sorted.
sort_direction: Option<DataTableSortDirection>The sort direction if sorted.
sort_index: Option<usize>The sort index for multi-column sorting.
can_sort: boolWhether the column can be sorted.
can_filter: boolWhether the column can be filtered.
can_resize: boolWhether the column can be resized.
is_pinned: boolWhether the column is pinned.
width: Option<f64>The current column width.
Implementations§
Source§impl DataTableHeaderContext
impl DataTableHeaderContext
Sourcepub fn with_sort(self, direction: DataTableSortDirection, index: usize) -> Self
pub fn with_sort(self, direction: DataTableSortDirection, index: usize) -> Self
Sourcepub fn with_can_sort(self, can_sort: bool) -> Self
pub fn with_can_sort(self, can_sort: bool) -> Self
Sourcepub fn with_can_filter(self, can_filter: bool) -> Self
pub fn with_can_filter(self, can_filter: bool) -> Self
Sourcepub fn with_can_resize(self, can_resize: bool) -> Self
pub fn with_can_resize(self, can_resize: bool) -> Self
Sourcepub fn with_pinned(self, pinned: bool) -> Self
pub fn with_pinned(self, pinned: bool) -> Self
Sourcepub fn with_width(self, width: f64) -> Self
pub fn with_width(self, width: f64) -> Self
Trait Implementations§
Source§impl Clone for DataTableHeaderContext
impl Clone for DataTableHeaderContext
Source§fn clone(&self) -> DataTableHeaderContext
fn clone(&self) -> DataTableHeaderContext
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 moreAuto Trait Implementations§
impl Freeze for DataTableHeaderContext
impl RefUnwindSafe for DataTableHeaderContext
impl Send for DataTableHeaderContext
impl Sync for DataTableHeaderContext
impl Unpin for DataTableHeaderContext
impl UnsafeUnpin for DataTableHeaderContext
impl UnwindSafe for DataTableHeaderContext
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