Skip to main content

DataTableTableState

Struct DataTableTableState 

Source
pub struct DataTableTableState {
Show 61 fields pub columns: StoredValue<Vec<DataTableColumnDef>>, pub column_groups: StoredValue<Option<Vec<DataTableColumnGroupDef>>>, pub source_kind: DataTableSourceKind, pub client_items: RwSignal<Vec<DataTableRowModel>>, pub processed: RwSignal<Vec<DataTableRowModel>>, pub processed_dataset: RwSignal<Dataset>, pub chart_x_field: RwSignal<Option<String>>, pub chart_y_fields: RwSignal<Vec<String>>, pub total_rows: Memo<usize>, pub page_count: Memo<usize>, pub quick_search: RwSignal<String>, pub filter: RwSignal<DataTableFilter>, pub sort: RwSignal<DataTableSort>, pub page: RwSignal<usize>, pub page_size: RwSignal<usize>, pub server_offset: RwSignal<u32>, pub server_total: RwSignal<Option<u64>>, pub server_loading: RwSignal<bool>, pub paging: PagingMode, pub selected: RwSignal<HashSet<String>>, pub selection_anchor: RwSignal<Option<String>>, pub cell_selection: RwSignal<CellSelection>, pub cell_dragging: RwSignal<bool>, pub column_visibility: RwSignal<HashMap<String, bool>>, pub column_widths: RwSignal<HashMap<String, f64>>, pub column_order: RwSignal<Vec<String>>, pub pinned_columns: RwSignal<PinnedColumnsState>, pub pinned_rows: RwSignal<PinnedRowsState>, pub row_order: RwSignal<Vec<String>>, pub expanded_rows: RwSignal<HashSet<String>>, pub expanded_tree_nodes: RwSignal<HashSet<String>>, pub expanded_groups: RwSignal<HashSet<String>>, pub get_tree_path: StoredValue<Option<GetTreePath>>, pub row_grouping: RwSignal<DataTableRowGrouping>, pub aggregation: RwSignal<AggregationModel>, pub aggregation_position: StoredValue<AggregationPosition>, pub pivot: RwSignal<DataTablePivotModel>, pub list_view: StoredValue<Option<ListViewConfig>>, pub pivot_columns: RwSignal<Vec<DataTableColumnDef>>, pub footer_row: RwSignal<Option<DataTableRowModel>>, pub get_row_id: StoredValue<Option<GetRowId>>, pub selection_mode: Signal<Option<DataTableSelectionMode>>, pub features: DataTableFeatures, pub resizable_columns: bool, pub header_height: Option<f64>, pub sortable: bool, pub events: StoredValue<Option<DataTableEvents>>, pub column_layout: Signal<ColumnLayout>, pub render_key: RwSignal<u32>, pub edit_mode: EditMode, pub edit_session: EditSessionStore, pub edit_error_dialog: RwSignal<Option<String>>, pub edit_history: RwSignal<EditHistory>, pub scroll_top: RwSignal<f64>, pub scroll_left: RwSignal<f64>, pub client_loading: RwSignal<bool>, pub focus_cell: RwSignal<Option<CellCoord>>, pub virtual_scroll_target: RwSignal<Option<usize>>, pub horizontal_scroll_target: RwSignal<Option<String>>, pub bounded_scroll: bool, pub auto_row_height: bool,
}
Expand description

Reactive table state shared by decomposed sub-components.

Fields§

§columns: StoredValue<Vec<DataTableColumnDef>>§column_groups: StoredValue<Option<Vec<DataTableColumnGroupDef>>>§source_kind: DataTableSourceKind§client_items: RwSignal<Vec<DataTableRowModel>>§processed: RwSignal<Vec<DataTableRowModel>>§processed_dataset: RwSignal<Dataset>

Chart-ready processed dataset (CHARTS_INTEGRATION).

§chart_x_field: RwSignal<Option<String>>

Suggested chart x-axis field key.

§chart_y_fields: RwSignal<Vec<String>>

Suggested chart y-axis field keys.

§total_rows: Memo<usize>§page_count: Memo<usize>§quick_search: RwSignal<String>§filter: RwSignal<DataTableFilter>§sort: RwSignal<DataTableSort>§page: RwSignal<usize>§page_size: RwSignal<usize>§server_offset: RwSignal<u32>§server_total: RwSignal<Option<u64>>§server_loading: RwSignal<bool>§paging: PagingMode§selected: RwSignal<HashSet<String>>§selection_anchor: RwSignal<Option<String>>§cell_selection: RwSignal<CellSelection>§cell_dragging: RwSignal<bool>§column_visibility: RwSignal<HashMap<String, bool>>§column_widths: RwSignal<HashMap<String, f64>>§column_order: RwSignal<Vec<String>>§pinned_columns: RwSignal<PinnedColumnsState>§pinned_rows: RwSignal<PinnedRowsState>§row_order: RwSignal<Vec<String>>§expanded_rows: RwSignal<HashSet<String>>§expanded_tree_nodes: RwSignal<HashSet<String>>

Expanded tree branch path keys (TREE_DATA).

§expanded_groups: RwSignal<HashSet<String>>

Expanded row group keys (ROW_GROUPING).

§get_tree_path: StoredValue<Option<GetTreePath>>§row_grouping: RwSignal<DataTableRowGrouping>§aggregation: RwSignal<AggregationModel>§aggregation_position: StoredValue<AggregationPosition>§pivot: RwSignal<DataTablePivotModel>§list_view: StoredValue<Option<ListViewConfig>>§pivot_columns: RwSignal<Vec<DataTableColumnDef>>§footer_row: RwSignal<Option<DataTableRowModel>>§get_row_id: StoredValue<Option<GetRowId>>§selection_mode: Signal<Option<DataTableSelectionMode>>§features: DataTableFeatures§resizable_columns: bool§header_height: Option<f64>§sortable: bool§events: StoredValue<Option<DataTableEvents>>§column_layout: Signal<ColumnLayout>§render_key: RwSignal<u32>

Bumped when processed rows change to refresh tbody rendering.

§edit_mode: EditMode§edit_session: EditSessionStore§edit_error_dialog: RwSignal<Option<String>>§edit_history: RwSignal<EditHistory>§scroll_top: RwSignal<f64>

Vertical scroll offset of the table scrollport (pixels).

§scroll_left: RwSignal<f64>

Horizontal scroll offset of the table scrollport (pixels).

§client_loading: RwSignal<bool>

Client-controlled loading flag for overlay state.

§focus_cell: RwSignal<Option<CellCoord>>

Roving keyboard focus cell for WAI-ARIA grid navigation.

§virtual_scroll_target: RwSignal<Option<usize>>

Target row index for programmatic scroll with virtualization.

§horizontal_scroll_target: RwSignal<Option<String>>

Target column field for programmatic horizontal scroll.

§bounded_scroll: bool

Whether the scroll body is height-bounded (sticky header, overlays).

§auto_row_height: bool

Whether rows use auto height (disables row virtualization).

Implementations§

Source§

impl DataTableTableState

Source

pub fn is_server(&self) -> bool

Source

pub fn editing_enabled(&self) -> bool

Source

pub fn editable_fields(&self) -> Vec<String>

Source

pub fn find_processed_row(&self, row_id: &str) -> Option<DataTableRowModel>

Source

pub fn start_cell_edit(&self, row_id: &str, field: &str)

Source

pub fn start_row_edit(&self, row_id: &str)

Source

pub fn cancel_edit(&self)

Source

pub fn commit_edit(&self, row_id: &str)

Source

pub fn commit_and_advance(&self, row_id: &str, field: &str)

Source

pub fn can_undo(&self) -> bool

Source

pub fn can_redo(&self) -> bool

Source

pub fn undo_edit(&self)

Source

pub fn redo_edit(&self)

Source

pub fn show_pagination(&self) -> bool

Source

pub fn pagination_range_bounds(&self) -> (usize, usize, usize, bool)

Bounds for the paged footer range label (from, to, total, estimated).

Source

pub fn visible_row_ids(&self) -> Vec<String>

Source

pub fn visible_data_fields(&self) -> Vec<String>

Source

pub fn visible_export_columns(&self) -> Vec<DataTableColumnDef>

Source

pub fn clear_cell_selection(&self)

Source

pub fn cell_selection_enabled(&self) -> bool

Source

pub fn clipboard_enabled(&self) -> bool

Source

pub fn excel_export_enabled(&self) -> bool

Source

pub fn charts_integration_enabled(&self) -> bool

Source

pub fn all_matching_rows(&self) -> Vec<DataTableRowModel>

All client rows matching filter/sort without pagination.

Source

pub fn processed_dataset(&self) -> Dataset

Source

pub fn sync_processed_dataset(&self, result: &ProcessedPipelineResult)

Update the live chart dataset and schema hints from a pipeline result.

Source

pub fn sync_processed_dataset_server_page(&self)

Update the live chart dataset from the current server page rows.

Source

pub fn rows_for_export(&self, scope: ExportRowScope) -> Vec<DataTableRowModel>

Source

pub fn columns_for_export( &self, scope: ExportRowScope, ) -> Vec<DataTableColumnDef>

Source

pub fn export_dataset(&self, scope: ExportRowScope) -> Dataset

Source

pub fn export_csv(&self, scope: ExportRowScope) -> String

Source

pub fn export_print_html(&self, scope: ExportRowScope) -> String

Source

pub fn export_xlsx(&self, scope: ExportRowScope) -> Result<Vec<u8>, String>

Source

pub fn apply_paste_text(&self, text: &str)

Source

pub fn resolve_id(&self, row: &DataTableRowModel) -> String

Source

pub fn notify_pagination(&self)

Source

pub fn notify_sort(&self)

Source

pub fn notify_filter(&self)

Source

pub fn reset_pagination(&self)

Source

pub fn notify_selection(&self)

Source

pub fn notify_column_resize(&self, field: &str, width: f64)

Source

pub fn notify_column_order_change(&self)

Source

pub fn notify_column_visibility_change(&self)

Source

pub fn notify_pinned_columns_change(&self)

Source

pub fn notify_row_order_change(&self)

Source

pub fn toggle_detail_row(&self, row_id: &str)

Source

pub fn toggle_tree_node(&self, path_key: &str)

Source

pub fn toggle_group(&self, group_key: &str)

Source

pub fn tree_data_enabled(&self) -> bool

Source

pub fn row_grouping_enabled(&self) -> bool

Source

pub fn aggregation_enabled(&self) -> bool

Source

pub fn pivot_enabled(&self) -> bool

Source

pub fn list_view_enabled(&self) -> bool

Source

pub fn reorder_row(&self, source_id: &str, target_id: &str, before: bool)

Source

pub fn set_column_visible(&self, field: &str, visible: bool)

Source

pub fn bump_render(&self)

Source

pub fn pin_column(&self, field: &str, side: PinSide)

Source

pub fn unpin_column(&self, field: &str)

Source

pub fn reorder_column( &self, source_field: &str, target_field: &str, before: bool, )

Source

pub fn recompute_client_processed(&self)

Source

pub fn apply_initial_state(&self, state: &DataTableInitialState)

Source

pub fn capture_state(&self) -> DataTableState

Source

pub fn apply_state(&self, state: &DataTableState)

Source

pub fn current_pagination(&self) -> PaginationState

Source

pub fn set_sort(&self, sort: DataTableSort)

Source

pub fn apply_header_sort_click(&self, field: &str, multi: bool, additive: bool)

Source

pub fn sort_column(&self, field: &str, direction: SortDirection)

Source

pub fn set_filter(&self, filter: DataTableFilter)

Source

pub fn set_pivot(&self, model: DataTablePivotModel)

Source

pub fn set_pagination(&self, pagination: PaginationState)

Source

pub fn set_selection(&self, selection: HashSet<String>)

Source

pub fn virtualization_enabled(&self) -> bool

Source

pub fn uses_auto_row_height(&self) -> bool

Source

pub fn has_row_span_merge(&self) -> bool

Source

pub fn has_active_filters(&self) -> bool

Source

pub fn source_row_count(&self) -> usize

Source

pub fn overlay_state(&self) -> OverlayState

Source

pub fn row_height_px(&self) -> f64

Source

pub fn set_focus_cell(&self, coord: Option<CellCoord>)

Source

pub fn scroll_to_row_id(&self, row_id: &str)

Source

pub fn scroll_to_column_field(&self, field: &str)

Source

pub fn toggle_row_selection(&self, row_id: &str, multiselect: bool)

Trait Implementations§

Source§

impl Clone for DataTableTableState

Source§

fn clone(&self) -> DataTableTableState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for DataTableTableState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
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, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
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, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
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> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for El
where El: IntoElementMaybeSignalType<T, Marker>,

Source§

impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
where T: From<Js> + Clone,

Source§

impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for El
where El: IntoElementsMaybeSignalType<T, Marker>,

Source§

impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
where T: From<Js> + Clone,

Source§

impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> SerializableKey for T

Source§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
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, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more