pub struct select;Expand description
A styled native select control.
Pass <option> or <optgroup> elements as children. Classes in attrs apply to
the wrapper, while other attributes and event handlers go on the <select>. The
control fills its container by default. Set aria-invalid="true" to show the error
border and focus ring.
Browsers with customizable select support also style the picker. For a styled group
heading, place a <legend> first inside an <optgroup> and keep its label
attribute for browsers that use the native picker.
ⓘ
view! {
select(
attrs: attributes! { name="region" },
<option>"eu-central-1"</option>
<option>"us-east-1"</option>
)
}Trait Implementations§
Source§impl Component for select
impl Component for select
Source§type Props<'__props> = SelectProps<'__props>
type Props<'__props> = SelectProps<'__props>
The component’s properties. The lifetime covers data borrowed from
the caller.
Source§fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn props_builder<'a>() -> <Self::Props<'a> as Props>::Builder
Auto Trait Implementations§
impl Freeze for select
impl RefUnwindSafe for select
impl Send for select
impl Sync for select
impl Unpin for select
impl UnsafeUnpin for select
impl UnwindSafe for select
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