pub struct DefaultNaiveDateTimeTableCellRendererProps<F>where
F: Fn(NaiveDateTime) + 'static,{
pub class: String,
pub value: MaybeSignal<NaiveDateTime>,
pub on_change: F,
pub index: usize,
pub format_string: Option<String>,
}chrono only.Expand description
Props for the DefaultNaiveDateTimeTableCellRenderer component.
The default cell renderer for chrono::NaiveDateTime.
This is only available when the crate feature chrono is enabled
§Required Props
- class:
String- The class attribute for the cell element. Generated by the classes provider.
- value:
impl Into<MaybeSignal<NaiveDateTime>>- The value to display.
- on_change: [
F]- Event handler called when the cell is changed. In this default renderer this will never happen.
- index:
usize- The index of the column. Starts at 0.
§Optional Props
- format_string:
String- The format string to use for formatting the date. Provided by the
#[table(format(string="..."))]attribute of the field. Seechrono::format::strftimefor more information.
- The format string to use for formatting the date. Provided by the
Fields§
§class: StringThe class attribute for the cell element. Generated by the classes provider.
value: MaybeSignal<NaiveDateTime>The value to display.
on_change: FEvent handler called when the cell is changed. In this default renderer this will never happen.
index: usizeThe index of the column. Starts at 0.
format_string: Option<String>The format string to use for formatting the date. Provided by the #[table(format(string="..."))] attribute of the field.
See chrono::format::strftime for more information.
Implementations§
source§impl<F> DefaultNaiveDateTimeTableCellRendererProps<F>where
F: Fn(NaiveDateTime) + 'static,
impl<F> DefaultNaiveDateTimeTableCellRendererProps<F>where
F: Fn(NaiveDateTime) + 'static,
sourcepub fn builder(
) -> DefaultNaiveDateTimeTableCellRendererPropsBuilder<F, ((), (), (), (), ())>
pub fn builder( ) -> DefaultNaiveDateTimeTableCellRendererPropsBuilder<F, ((), (), (), (), ())>
Create a builder for building DefaultNaiveDateTimeTableCellRendererProps.
On the builder, call .class(...), .value(...), .on_change(...), .index(...), .format_string(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DefaultNaiveDateTimeTableCellRendererProps.