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 new(column_id: ColumnId, column_index: usize) -> DataTableHeaderContext
pub fn new(column_id: ColumnId, column_index: usize) -> DataTableHeaderContext
Sourcepub fn with_sort(
self,
direction: DataTableSortDirection,
index: usize,
) -> DataTableHeaderContext
pub fn with_sort( self, direction: DataTableSortDirection, index: usize, ) -> DataTableHeaderContext
Sourcepub fn with_can_sort(self, can_sort: bool) -> DataTableHeaderContext
pub fn with_can_sort(self, can_sort: bool) -> DataTableHeaderContext
Sourcepub fn with_can_filter(self, can_filter: bool) -> DataTableHeaderContext
pub fn with_can_filter(self, can_filter: bool) -> DataTableHeaderContext
Sourcepub fn with_can_resize(self, can_resize: bool) -> DataTableHeaderContext
pub fn with_can_resize(self, can_resize: bool) -> DataTableHeaderContext
Sourcepub fn with_pinned(self, pinned: bool) -> DataTableHeaderContext
pub fn with_pinned(self, pinned: bool) -> DataTableHeaderContext
Sourcepub fn with_width(self, width: f64) -> DataTableHeaderContext
pub fn with_width(self, width: f64) -> DataTableHeaderContext
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
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>
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.