pub struct MenuProps {Show 19 fields
pub open: bool,
pub anchor: Option<HtmlElement>,
pub quick: bool,
pub absolute: bool,
pub fixed: bool,
pub x: Option<isize>,
pub y: Option<isize>,
pub force_group_selection: bool,
pub fullwidth: bool,
pub wrap_focus: bool,
pub inner_role: String,
pub multi: bool,
pub activatable: bool,
pub onopened: Callback<()>,
pub onclosed: Callback<()>,
pub onaction: Callback<ListIndex>,
pub onselected: Callback<SelectedDetail>,
pub link: WeakComponentLink<Menu>,
pub children: Children,
}
Expand description
Props for Menu
Documentation properties and events
Fields§
§open: bool
Changing this prop re-renders the component.
For general usage, consider using show
method provided by
WeakComponentLink<Menu>
via menu_link
anchor: Option<HtmlElement>
§quick: bool
§absolute: bool
§fixed: bool
§x: Option<isize>
§y: Option<isize>
§force_group_selection: bool
§fullwidth: bool
§wrap_focus: bool
§inner_role: String
§multi: bool
§activatable: bool
§onopened: Callback<()>
Binds to opened
event on menu-surface
See events docs to learn more.
onclosed: Callback<()>
Binds to closed
event on menu-surface
See events docs to learn more.
onaction: Callback<ListIndex>
Binds to action
event on list
See events docs to learn more.
onselected: Callback<SelectedDetail>
Binds to selected
event on list
See events docs to learn more.
link: WeakComponentLink<Menu>
WeakComponentLink
for Menu
which provides the following methods
get_focused_item_index(&self) -> usize
focus_item_at_index(&self, index: usize)
select(&self, index: &JsValue)
show(&self)
close(&self)
See WeakComponentLink
documentation for more information
children: Children
Trait Implementations§
Source§impl Properties for MenuProps
impl Properties for MenuProps
impl StructuralPartialEq for MenuProps
Auto Trait Implementations§
impl Freeze for MenuProps
impl !RefUnwindSafe for MenuProps
impl !Send for MenuProps
impl !Sync for MenuProps
impl Unpin for MenuProps
impl !UnwindSafe for MenuProps
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