leptos_struct_table

Trait TableClassesProvider

Source
pub trait TableClassesProvider {
    // Required method
    fn new() -> Self;

    // Provided methods
    fn thead(&self, prop_class: &str) -> String { ... }
    fn thead_row(&self, prop_class: &str) -> String { ... }
    fn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String { ... }
    fn thead_cell_inner(&self) -> String { ... }
    fn tbody(&self, prop_class: &str) -> String { ... }
    fn row(&self, row_index: usize, selected: bool, prop_class: &str) -> String { ... }
    fn loading_cell(
        &self,
        row_index: usize,
        col_index: usize,
        prop_class: &str,
    ) -> String { ... }
    fn loading_cell_inner(
        &self,
        row_index: usize,
        col_index: usize,
        prop_class: &str,
    ) -> String { ... }
    fn cell(&self, macro_class: &str) -> String { ... }
}
Expand description

A trait for providing classes for the table.

Required Methods§

Source

fn new() -> Self

Create a new instance of the class provider.

Provided Methods§

Source

fn thead(&self, prop_class: &str) -> String

Get the class attribute for the thead. The prop_class parameter contains the classes specified in the thead_class prop of the [TableContent] component.

Source

fn thead_row(&self, prop_class: &str) -> String

Get the classes for the thead row. The prop_class parameter contains the classes specified in the thead_row_class prop of the [TableContent] component.

Source

fn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String

Get the classes for the thead cells. The sort parameter contains the sort state of the column. The macro_class parameter contains the classes specified in the head_class macro attribute of the field.

Source

fn thead_cell_inner(&self) -> String

Get the classes for the thead cells’ inner element.

Source

fn tbody(&self, prop_class: &str) -> String

Get the classes for the tbody. The prop_class parameter contains the classes specified in the tbody_class prop of the [TableContent] component.

Source

fn row(&self, row_index: usize, selected: bool, prop_class: &str) -> String

Get the classes for the body rows. The row_index parameter contains the index of the row. The first row has index 0. The selected parameter indicates whether the row is selected. The prop_class parameter contains the classes specified in the row_class prop of the [TableContent] component.

Source

fn loading_cell( &self, row_index: usize, col_index: usize, prop_class: &str, ) -> String

Get the classes for the elements inside of the cells of rows that are currently being loaded. The prop_class parameter contains the classes specified in the loading_cell_class prop of the [TableContent] component.

Source

fn loading_cell_inner( &self, row_index: usize, col_index: usize, prop_class: &str, ) -> String

Get the classes for the elements inside of the cells of rows that are currently being loaded. Usually this will be some loading indicator like a sceleton bar. The prop_class parameter contains the classes specified in the loading_cell_inner_class prop of the [TableContent] component.

Source

fn cell(&self, macro_class: &str) -> String

Get the classes for the body cells. The macro_class parameter contains the classes specified in the class macro attribute of the field.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§