Function Select

Source
pub fn Select<T>(props: SelectProps<T>) -> impl IntoView
where T: IntoEnumIterator + FromStr<Err = ParseError> + Into<&'static str> + Clone + Copy + Default + Eq + Hash + Display + 'static,
Expand description

A component that renders a select field from an enum.

§Required Props

§Optional Props

  • value: impl Into<MaybeProp<T>>
    • The initial value of the input field.
  • change: [impl Into<Callback<Result<T, T::Err>, ()>>](Callback<Result<T, T::Err>, ()>)
    • A write signal that is updated with the parsed value of the input field.
  • error: impl Into<MaybeProp<TextProp>>
    • Set a custom error message for the input field.