Skip to main content

use_table

Function use_table 

Source
pub fn use_table<'hook, T: Clone + PartialEq + 'static + 'hook>(
    columns: Vec<ColumnDef<T>>,
    data: Vec<T>,
    _options: Option<DataTableOptions>,
) -> impl 'hook + Hook<Output = UseTableHandle<T>>
Expand description

Hook for creating and managing a table instance.

§Arguments

  • columns - Column definitions for the table
  • data - The data to display in the table
  • options - Optional table configuration

§Returns

A UseTableHandle that provides access to table state and methods.

§Note

When used in function components and hooks, this hook is equivalent to:

/// Hook for creating and managing a table instance.
///
/// # Arguments
///
/// * `columns` - Column definitions for the table
/// * `data` - The data to display in the table
/// * `options` - Optional table configuration
///
/// # Returns
///
/// A `UseTableHandle` that provides access to table state and methods.
pub fn use_table<T: Clone + PartialEq + 'static>(
    columns: Vec<ColumnDef<T>>,
    data: Vec<T>,
    _options: Option<DataTableOptions>,
) -> UseTableHandle<T> {
    /* implementation omitted */
}