pub trait TableClassesProvider: Clone {
// Required method
fn new() -> Self;
// Provided methods
fn table(&self, classes: &str) -> String { ... }
fn head_row(&self, template_classes: &str) -> String { ... }
fn head_cell(&self, sort: ColumnSort, template_classes: &str) -> String { ... }
fn head_cell_inner(&self) -> String { ... }
fn row(
&self,
row_index: usize,
selected: bool,
template_classes: &str
) -> String { ... }
fn cell(&self, template_classes: &str) -> String { ... }
}
Expand description
A trait for providing classes for the table.
Required Methods§
Provided Methods§
sourcefn table(&self, classes: &str) -> String
fn table(&self, classes: &str) -> String
Get the classes for the root table element.
The classes
parameter contains the classes specified in the classes
prop of the generated component.
sourcefn head_row(&self, template_classes: &str) -> String
fn head_row(&self, template_classes: &str) -> String
Get the classes for the head row.
The template_classes
parameter contains the classes specified in the head_row_class
attribute of the struct.
sourcefn head_cell(&self, sort: ColumnSort, template_classes: &str) -> String
fn head_cell(&self, sort: ColumnSort, template_classes: &str) -> String
Get the classes for the head cells.
The sort
parameter contains the sort state of the column.
The template_classes
parameter contains the classes specified in the head_class
attribute of the field.
sourcefn head_cell_inner(&self) -> String
fn head_cell_inner(&self) -> String
Get the classes for the head cells’ inner element.
sourcefn row(
&self,
row_index: usize,
selected: bool,
template_classes: &str
) -> String
fn row( &self, row_index: usize, selected: bool, template_classes: &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 template_classes
parameter contains the classes specified in the row_class
attribute of the struct.