pub struct DefaultTableHeaderRendererProps<C, F>{
pub class: Signal<String>,
pub inner_class: String,
pub index: usize,
pub column: C,
pub sort_priority: Signal<Option<usize>>,
pub sort_direction: Signal<ColumnSort>,
pub on_click: F,
pub children: Children,
}
Expand description
Props for the DefaultTableHeaderRenderer
component.
The default table header renderer. Renders roughly
<th>
<span>Title</span>
</th>
Required Props
- class:
impl Into<Signal<String>>
- The class attribute for the head element. Generated by the classes provider.
- inner_class:
impl Into<String>
- The class attribute for the inner element. Generated by the classes provider.
- index:
usize
- The index of the column. Starts at 0 for the first column. The order of the columns is the same as the order of the fields in the struct.
- column: [
C
]- The column enum variant. It is auto generated from the struct.
- sort_priority:
impl Into<Signal<Option<usize>>>
- The sort priority of the column.
None
if the column is not sorted.0
means the column is the primary sort column.
- The sort priority of the column.
- sort_direction:
impl Into<Signal<ColumnSort>>
- The sort direction of the column. See
ColumnSort
.
- The sort direction of the column. See
- on_click: [
F
]- The event handler for the click event. Has to be called with
TableHeadEvent
.
- The event handler for the click event. Has to be called with
- children:
Children
Fields§
§class: Signal<String>
The class attribute for the head element. Generated by the classes provider.
inner_class: String
The class attribute for the inner element. Generated by the classes provider.
index: usize
The index of the column. Starts at 0 for the first column. The order of the columns is the same as the order of the fields in the struct.
column: C
The column enum variant. It is auto generated from the struct.
sort_priority: Signal<Option<usize>>
The sort priority of the column. None
if the column is not sorted. 0
means the column is the primary sort column.
sort_direction: Signal<ColumnSort>
The sort direction of the column. See ColumnSort
.
on_click: F
The event handler for the click event. Has to be called with TableHeadEvent
.
children: Children
Implementations§
source§impl<C, F> DefaultTableHeaderRendererProps<C, F>
impl<C, F> DefaultTableHeaderRendererProps<C, F>
sourcepub fn builder(
) -> DefaultTableHeaderRendererPropsBuilder<C, F, ((), (), (), (), (), (), (), ())>
pub fn builder( ) -> DefaultTableHeaderRendererPropsBuilder<C, F, ((), (), (), (), (), (), (), ())>
Create a builder for building DefaultTableHeaderRendererProps
.
On the builder, call .class(...)
, .inner_class(...)
, .index(...)
, .column(...)
, .sort_priority(...)
, .sort_direction(...)
, .on_click(...)
, .children(...)
to set the values of the fields.
Finally, call .build()
to create the instance of DefaultTableHeaderRendererProps
.