pub struct FormSelectProps<T: Clone + PartialEq + 'static> {
pub id: Option<String>,
pub value: T,
pub options: Vec<(T, &'static str)>,
pub onchange: EventHandler<T>,
pub trigger_class: Option<&'static str>,
}Expand description
Properties for the FormSelect component.
Fields§
§id: Option<String>§value: T§options: Vec<(T, &'static str)>§onchange: EventHandler<T>§trigger_class: Option<&'static str>触发器样式覆盖:缺省为全宽表单款;工具栏内联场景传
FORM_SELECT_COMPACT_CLASS,或自定义类串(如编辑器底部胶囊)。
Implementations§
Source§impl<T: Clone + PartialEq + 'static> FormSelectProps<T>
impl<T: Clone + PartialEq + 'static> FormSelectProps<T>
Sourcepub fn builder() -> FormSelectPropsBuilder<((), (), (), (), ()), T>
pub fn builder() -> FormSelectPropsBuilder<((), (), (), (), ()), T>
Create a builder for building FormSelectProps.
On the builder, call .id(...)(optional), .value(...), .options(...), .onchange(...), .trigger_class(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FormSelectProps.
Trait Implementations§
Source§impl<T: Clone + PartialEq + 'static> Properties for FormSelectProps<T>where
Self: Clone,
impl<T: Clone + PartialEq + 'static> Properties for FormSelectProps<T>where
Self: Clone,
Source§type Builder = FormSelectPropsBuilder<((), (), (), (), ()), T>
type Builder = FormSelectPropsBuilder<((), (), (), (), ()), T>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Make the old props equal to the new props. Return if the props were equal and should be memoized.
§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Create a component from the props.
Auto Trait Implementations§
impl<T> Freeze for FormSelectProps<T>where
T: Freeze,
impl<T> !RefUnwindSafe for FormSelectProps<T>
impl<T> !Send for FormSelectProps<T>
impl<T> !Sync for FormSelectProps<T>
impl<T> Unpin for FormSelectProps<T>where
T: Unpin,
impl<T> UnsafeUnpin for FormSelectProps<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for FormSelectProps<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.