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: TableRowMeasureModeControls whether the virtualized body rows are treated as fixed-height or measured.
Fixed(default): fast path; row containers are forced torow_heightand 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: boolWhen 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: boolWhen 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: PointerRowSelectionPolicyPointer selection policy (when pointer_row_selection is enabled).
keep_pinned_rows: boolWhen 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: boolWhen 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: boolWhen 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: boolWhen 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: GroupedRowPinningPolicyGrouped-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
impl Clone for TableViewProps
Source§fn clone(&self) -> TableViewProps
fn clone(&self) -> TableViewProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more