pub struct DropdownMenuContentProps<__ImplTrait0: IntoView + 'static> {
pub on_escape_key_down: Option<Callback<KeyboardEvent>>,
pub on_pointer_down_outside: Option<Callback<PointerEvent>>,
pub loop: MaybeProp<bool>,
pub side: MaybeProp<String>,
pub side_offset: MaybeProp<f64>,
pub align: MaybeProp<String>,
pub align_offset: MaybeProp<f64>,
pub avoid_collisions: MaybeProp<bool>,
pub collision_padding: MaybeProp<f64>,
pub as_child: MaybeProp<bool>,
pub node_ref: AnyNodeRef,
pub children: TypedChildrenFn<__ImplTrait0>,
}Expand description
Props for the DropdownMenuContent component.
§Required Props
- children:
TypedChildrenFn<__ImplTrait0>
§Optional Props
- on_escape_key_down:
impl Into<Callback<web_sys::KeyboardEvent>> - on_pointer_down_outside:
impl Into<Callback<web_sys::PointerEvent>> - r#loop:
impl Into<MaybeProp<bool>> - side:
impl Into<MaybeProp<String>>- Which side to position on: “top” | “right” | “bottom” | “left”
- side_offset:
impl Into<MaybeProp<f64>>- Offset from the trigger (pixels).
- align:
impl Into<MaybeProp<String>>- Alignment along the side: “start” | “center” | “end”
- align_offset:
impl Into<MaybeProp<f64>>- Offset along the alignment axis (pixels).
- avoid_collisions:
impl Into<MaybeProp<bool>>- Whether to flip/shift to avoid viewport collisions.
- collision_padding:
impl Into<MaybeProp<f64>>- Padding from viewport edge when avoiding collisions (pixels).
- as_child:
impl Into<MaybeProp<bool>> - node_ref:
impl Into<AnyNodeRef>
Fields§
§on_escape_key_down: Option<Callback<KeyboardEvent>>§on_pointer_down_outside: Option<Callback<PointerEvent>>§loop: MaybeProp<bool>§side: MaybeProp<String>Which side to position on: “top” | “right” | “bottom” | “left”
side_offset: MaybeProp<f64>Offset from the trigger (pixels).
align: MaybeProp<String>Alignment along the side: “start” | “center” | “end”
align_offset: MaybeProp<f64>Offset along the alignment axis (pixels).
avoid_collisions: MaybeProp<bool>Whether to flip/shift to avoid viewport collisions.
collision_padding: MaybeProp<f64>Padding from viewport edge when avoiding collisions (pixels).
as_child: MaybeProp<bool>§node_ref: AnyNodeRef§children: TypedChildrenFn<__ImplTrait0>Implementations§
Source§impl<__ImplTrait0: IntoView + 'static> DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0: IntoView + 'static> DropdownMenuContentProps<__ImplTrait0>
Sourcepub fn builder() -> DropdownMenuContentPropsBuilder<__ImplTrait0, ((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DropdownMenuContentPropsBuilder<__ImplTrait0, ((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building DropdownMenuContentProps.
On the builder, call .on_escape_key_down(...)(optional), .on_pointer_down_outside(...)(optional), .r#loop(...)(optional), .side(...)(optional), .side_offset(...)(optional), .align(...)(optional), .align_offset(...)(optional), .avoid_collisions(...)(optional), .collision_padding(...)(optional), .as_child(...)(optional), .node_ref(...)(optional), .children(...) to set the values of the fields.
Finally, call .build() to create the instance of DropdownMenuContentProps.
Trait Implementations§
Auto Trait Implementations§
impl<__ImplTrait0> Freeze for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> !RefUnwindSafe for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> Send for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> Sync for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> Unpin for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> UnsafeUnpin for DropdownMenuContentProps<__ImplTrait0>
impl<__ImplTrait0> !UnwindSafe for DropdownMenuContentProps<__ImplTrait0>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more