Skip to main content

TableViewProps

Struct TableViewProps 

Source
pub struct TableViewProps {
Show 23 fields pub size: Size, pub row_height: Option<Px>, pub header_height: Option<Px>, pub row_measure_mode: TableRowMeasureMode, pub overscan: usize, pub keep_alive: Option<usize>, pub default_column_width: Px, pub min_column_width: Px, pub enable_sorting: bool, pub enable_column_resizing: bool, pub column_resize_mode: ColumnResizeMode, pub column_resize_direction: ColumnResizeDirection, pub enable_column_grouping: bool, pub grouped_column_mode: GroupedColumnMode, pub enable_row_selection: bool, pub single_row_selection: bool, pub pointer_row_selection: bool, pub pointer_row_selection_policy: PointerRowSelectionPolicy, pub keep_pinned_rows: bool, pub draw_frame: bool, pub optimize_paint_order: bool, pub optimize_grid_lines: bool, pub grouped_row_pinning_policy: GroupedRowPinningPolicy,
}

Fields§

§size: Size§row_height: Option<Px>§header_height: Option<Px>

Optional fixed header height (defaults to row_height when unset).

This enables shadcn-style tables where the header row height differs from body row height.

§row_measure_mode: TableRowMeasureMode

Controls whether the virtualized body rows are treated as fixed-height or measured.

  • Fixed (default): fast path; row containers are forced to row_height and the virtualizer skips per-row measurement work.
  • Measured: enables variable-height rows (e.g. wrapping Markdown) by letting the runtime measure visible rows and write sizes back into the virtualizer.
§overscan: usize§keep_alive: Option<usize>

Optional retained-subtree budget for overscan window shifts (retained host path).

When None, the default heuristic is overscan * 2.

Larger values reduce remount/layout churn when the window oscillates across boundaries (e.g. scroll bounce patterns), at the cost of retaining more offscreen subtrees.

§default_column_width: Px§min_column_width: Px§enable_sorting: bool

When true, clicking a sortable header updates TableState.sorting.

This is a UI-side interaction toggle; sorting math still lives in the headless engine.

§enable_column_resizing: bool§column_resize_mode: ColumnResizeMode§column_resize_direction: ColumnResizeDirection§enable_column_grouping: bool§grouped_column_mode: GroupedColumnMode§enable_row_selection: bool§single_row_selection: bool§pointer_row_selection: bool

When true (default), pointer-activating a row toggles its selection state.

Set this to false for shadcn-style recipes where selection is driven by an explicit checkbox column (and row clicks should not toggle selection).

§pointer_row_selection_policy: PointerRowSelectionPolicy

Pointer selection policy (when pointer_row_selection is enabled).

§keep_pinned_rows: bool

When false, pinned rows are only rendered if they are part of the current filtered/sorted/paginated row model (TanStack keepPinnedRows=false).

When true (default), pinned rows can remain visible even when they are outside the current row model (TanStack default).

§draw_frame: bool

When false, the table does not render an outer border/radius frame.

This is useful when embedding the table inside a higher-level component that owns the surrounding chrome (e.g. a shadcn recipe with its own border + radius).

§optimize_paint_order: bool

When enabled, paints table cell backgrounds/borders in a separate layer from cell content.

This is a targeted performance knob intended to reduce renderer pipeline switches for text-heavy tables by avoiding per-cell interleaving of quads and text draws.

Note: this may increase UI tree complexity because it introduces an overlay layer per row.

§optimize_grid_lines: bool

When enabled, draws only coarse column-group separators instead of per-cell vertical grid lines.

This reduces quad count and renderer state churn for wide tables, but it also changes the visual semantics of the grid (column-level separators are removed).

Limitations / caveats:

  • Default: false.
  • This intentionally trades per-column dividers for only {left|center|right} group dividers.
  • It is not a stable styling contract. Prefer keeping it disabled unless profiling shows that per-cell dividers dominate quad count and pipeline switches for your workload.
  • This may be replaced by a formal style option (e.g. TableGridLines) or removed entirely once a better default grid strategy exists.
§grouped_row_pinning_policy: GroupedRowPinningPolicy

Grouped-mode row pinning display policy.

TanStack table-core exposes pinning via getTopRows/getCenterRows/getBottomRows, and the most common UI recipe is to render pinned rows in dedicated top/bottom bands (removing them from the paged center rows). PromotePinnedRows matches that TanStack-typical behavior and is the default.

Trait Implementations§

Source§

impl Clone for TableViewProps

Source§

fn clone(&self) -> TableViewProps

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableViewProps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TableViewProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UiElementA11yExt for T

Source§

fn a11y(self, decoration: SemanticsDecoration) -> UiElementWithA11y<Self>

Source§

fn a11y_role(self, role: SemanticsRole) -> UiElementWithA11y<Self>

Source§

fn a11y_label(self, label: impl Into<Arc<str>>) -> UiElementWithA11y<Self>

Source§

fn a11y_value(self, value: impl Into<Arc<str>>) -> UiElementWithA11y<Self>

Source§

fn a11y_disabled(self, disabled: bool) -> UiElementWithA11y<Self>

Source§

fn a11y_selected(self, selected: bool) -> UiElementWithA11y<Self>

Source§

fn a11y_expanded(self, expanded: bool) -> UiElementWithA11y<Self>

Source§

fn a11y_checked(self, checked: Option<bool>) -> UiElementWithA11y<Self>

Source§

impl<T> UiElementKeyContextExt for T

Source§

fn key_context( self, key_context: impl Into<Arc<str>>, ) -> UiElementWithKeyContext<Self>

Source§

impl<T> UiElementTestIdExt for T

Source§

fn test_id(self, id: impl Into<Arc<str>>) -> UiElementWithTestId<Self>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more