Skip to main content

TableBuilder

Struct TableBuilder 

Source
pub struct TableBuilder<'a, TData> { /* private fields */ }

Implementations§

Source§

impl<'a, TData> TableBuilder<'a, TData>

Source

pub fn new(data: &'a [TData]) -> TableBuilder<'a, TData>

Source

pub fn columns(self, columns: Vec<ColumnDef<TData>>) -> TableBuilder<'a, TData>

Source

pub fn sorting_fn_builtin( self, key: impl Into<Arc<str>>, sorting_fn: BuiltInSortingFn, ) -> TableBuilder<'a, TData>

Register a named sorting function (TanStack options.sortingFns equivalent).

Source

pub fn sorting_fn_cmp( self, key: impl Into<Arc<str>>, cmp: impl Fn(&TData, &TData) -> Ordering + 'static, ) -> TableBuilder<'a, TData>

Register a named sorting comparator (TanStack options.sortingFns equivalent).

Source

pub fn filter_fn_builtin( self, key: impl Into<Arc<str>>, filter_fn: BuiltInFilterFn, ) -> TableBuilder<'a, TData>

Register a named filter function (TanStack options.filterFns equivalent).

Source

pub fn filter_fn_value( self, key: impl Into<Arc<str>>, f: impl Fn(&TanStackValue, &Value) -> bool + 'static, ) -> TableBuilder<'a, TData>

Register a named filter function that operates over the column’s getValue().

Source

pub fn filter_fn_value_with_meta( self, key: impl Into<Arc<str>>, f: impl Fn(&TanStackValue, &Value, &mut dyn FnMut(Value)) -> bool + 'static, ) -> TableBuilder<'a, TData>

Register a named filter function with TanStack-like addMeta support.

Source

pub fn global_filter_fn(self, spec: FilteringFnSpec) -> TableBuilder<'a, TData>

Configure the global filter function (TanStack globalFilterFn).

Source

pub fn get_column_can_global_filter( self, f: impl Fn(&ColumnDef<TData>, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

Configure the table-level global filter hook (TanStack getColumnCanGlobalFilter).

Source

pub fn state(self, state: TableState) -> TableBuilder<'a, TData>

Source

pub fn initial_state(self, initial_state: TableState) -> TableBuilder<'a, TData>

TanStack-aligned: override the initialState snapshot used by table-level reset APIs.

If not set, the initialState defaults to the same value as state.

Source

pub fn options(self, options: TableOptions) -> TableBuilder<'a, TData>

Source

pub fn manual_filtering(self, manual: bool) -> TableBuilder<'a, TData>

Source

pub fn filter_from_leaf_rows(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn max_leaf_row_filter_depth(self, depth: usize) -> TableBuilder<'a, TData>

Source

pub fn override_filtered_row_model_pre_filtered(self) -> TableBuilder<'a, TData>

TanStack-aligned: override getFilteredRowModel to return getPreFilteredRowModel().

Source

pub fn manual_sorting(self, manual: bool) -> TableBuilder<'a, TData>

Source

pub fn override_sorted_row_model_pre_sorted(self) -> TableBuilder<'a, TData>

TanStack-aligned: override getSortedRowModel to return getPreSortedRowModel().

Source

pub fn manual_pagination(self, manual: bool) -> TableBuilder<'a, TData>

Source

pub fn manual_expanding(self, manual: bool) -> TableBuilder<'a, TData>

Source

pub fn override_expanded_row_model_pre_expanded(self) -> TableBuilder<'a, TData>

TanStack-aligned: override getExpandedRowModel to return getPreExpandedRowModel().

Source

pub fn override_pagination_row_model_pre_pagination( self, ) -> TableBuilder<'a, TData>

TanStack-aligned: override getPaginationRowModel to return getPrePaginationRowModel().

Source

pub fn paginate_expanded_rows(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn keep_pinned_rows(self, keep: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_hiding(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_column_ordering(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_pinning(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_column_pinning(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_row_pinning(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn enable_row_pinning_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.enableRowPinning as a per-row predicate.

Source

pub fn enable_row_selection_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.enableRowSelection as a per-row predicate.

Source

pub fn enable_multi_row_selection_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.enableMultiRowSelection as a per-row predicate.

Source

pub fn enable_sub_row_selection_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.enableSubRowSelection as a per-row predicate.

Source

pub fn get_row_can_expand_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.getRowCanExpand as a per-row predicate.

Source

pub fn get_is_row_expanded_by( self, f: impl Fn(RowKey, &TData) -> bool + 'static, ) -> TableBuilder<'a, TData>

TanStack-aligned: configure options.getIsRowExpanded as a per-row predicate.

Source

pub fn enable_column_resizing(self, enabled: bool) -> TableBuilder<'a, TData>

Source

pub fn get_row_key( self, f: impl Fn(&TData, usize, Option<&RowKey>) -> RowKey + 'a, ) -> TableBuilder<'a, TData>

Source

pub fn get_row_id( self, f: impl Fn(&TData, usize, Option<&RowId>) -> RowId + 'a, ) -> TableBuilder<'a, TData>

TanStack-aligned: set the string row identity function (options.getRowId equivalent).

Source

pub fn get_sub_rows( self, f: impl for<'r> Fn(&'r TData, usize) -> Option<&'r [TData]> + 'a, ) -> TableBuilder<'a, TData>

Source

pub fn get_grouped_row_model( self, f: impl Fn(&RowModel<'a, TData>, &[ColumnDef<TData>], &Vec<Arc<str>>) -> GroupedRowModel + 'a, ) -> TableBuilder<'a, TData>

Override the grouped row model generator (TanStack getGroupedRowModel equivalent).

Source

pub fn get_global_faceted_row_model( self, f: impl Fn(&Table<'a, TData>) -> RowModel<'a, TData> + 'a, ) -> TableBuilder<'a, TData>

Override the “global faceted row model” surface (TanStack getGlobalFacetedRowModel).

Source

pub fn get_global_faceted_unique_values( self, f: impl Fn(&Table<'a, TData>) -> HashMap<u64, usize> + 'a, ) -> TableBuilder<'a, TData>

Override the “global faceted unique values” surface (TanStack getGlobalFacetedUniqueValues).

Source

pub fn get_global_faceted_min_max_u64( self, f: impl Fn(&Table<'a, TData>) -> Option<(u64, u64)> + 'a, ) -> TableBuilder<'a, TData>

Override the “global faceted min/max” surface (TanStack getGlobalFacetedMinMaxValues).

Source

pub fn aggregation_fn( self, key: impl Into<Arc<str>>, aggregation_fn: Arc<dyn Fn(&str, &[TanStackValue]) -> TanStackValue + Sync + Send>, ) -> TableBuilder<'a, TData>

Register a named aggregation function (TanStack options.aggregationFns equivalent).

Source

pub fn render_fallback_value( self, value: TanStackValue, ) -> TableBuilder<'a, TData>

TanStack-aligned: set renderFallbackValue used by cell.renderValue().

Source

pub fn build(self) -> Table<'a, TData>

Auto Trait Implementations§

§

impl<'a, TData> Freeze for TableBuilder<'a, TData>

§

impl<'a, TData> !RefUnwindSafe for TableBuilder<'a, TData>

§

impl<'a, TData> !Send for TableBuilder<'a, TData>

§

impl<'a, TData> !Sync for TableBuilder<'a, TData>

§

impl<'a, TData> Unpin for TableBuilder<'a, TData>

§

impl<'a, TData> UnsafeUnpin for TableBuilder<'a, TData>

§

impl<'a, TData> !UnwindSafe for TableBuilder<'a, TData>

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> 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, 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