pub trait TableRow: Clone {
    type ClassesProvider: TableClassesProvider + Copy;

    const COLUMN_COUNT: usize;

    // Required methods
    fn render_row(
        &self,
        index: usize,
        on_change: EventHandler<ChangeEvent<Self>>
    ) -> impl IntoView;
    fn render_head_row<F>(
        sorting: Signal<VecDeque<(usize, ColumnSort)>>,
        on_head_click: F
    ) -> impl IntoView
       where F: Fn(TableHeadEvent) + Clone + 'static;
}
Expand description

This trait has to implemented in order for [TableContent] to be able to render rows and the head row of the table. Usually this is done by #[derive(TableRow, Clone)].

Please see the simple example for how to use.

Required Associated Types§

Required Associated Constants§

source

const COLUMN_COUNT: usize

How many columns this row has (i.e. the number of fields in the struct)

Required Methods§

source

fn render_row( &self, index: usize, on_change: EventHandler<ChangeEvent<Self>> ) -> impl IntoView

This render function has to render exactly one root element.

source

fn render_head_row<F>( sorting: Signal<VecDeque<(usize, ColumnSort)>>, on_head_click: F ) -> impl IntoView
where F: Fn(TableHeadEvent) + Clone + 'static,

Object Safety§

This trait is not object safe.

Implementors§