MCPcopy Create free account
hub / github.com/angular-rust/yew-components / MenuProps

Class MenuProps

src/menu.rs:47–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45/// and [events](https://github.com/material-components/material-components-web-components/tree/master/packages/menu#events)
46#[derive(Clone, PartialEq, Properties)]
47pub struct MenuProps {
48 /// Changing this prop re-renders the component.
49 /// For general usage, consider using `show` method provided by
50 /// `WeakComponentLink<Menu>` via `menu_link`
51 #[prop_or_default]
52 pub open: bool,
53 #[prop_or_default]
54 pub anchor: Option<web_sys::HtmlElement>,
55 // #[prop_or(Corner::TopStart)]
56 // pub corner: Corner,
57 // #[prop_or(MenuCorner::Start)]
58 // pub menu_corner: MenuCorner,
59 #[prop_or_default]
60 pub quick: bool,
61 #[prop_or_default]
62 pub absolute: bool,
63 #[prop_or_default]
64 pub fixed: bool,
65 #[prop_or_default]
66 pub x: Option<isize>,
67 #[prop_or_default]
68 pub y: Option<isize>,
69 #[prop_or_default]
70 pub force_group_selection: bool,
71 // #[prop_or(DefaultFocusState::ListRoot)]
72 // pub default_focus: DefaultFocusState,
73 #[prop_or_default]
74 pub fullwidth: bool,
75 #[prop_or_default]
76 pub wrap_focus: bool,
77 #[prop_or_default]
78 pub inner_role: String,
79 #[prop_or_default]
80 pub multi: bool,
81 #[prop_or_default]
82 pub activatable: bool,
83 /// Binds to `opened` event on `menu-surface`
84 ///
85 /// See events docs to learn more.
86 #[prop_or_default]
87 pub onopened: Callback<()>,
88 /// Binds to `closed` event on `menu-surface`
89 ///
90 /// See events docs to learn more.
91 #[prop_or_default]
92 pub onclosed: Callback<()>,
93 /// Binds to `action` event on `list`
94 ///
95 /// See events docs to learn more.
96 #[prop_or_default]
97 pub onaction: Callback<ListIndex>,
98 /// Binds to `selected` event on `list`
99 ///
100 /// See events docs to learn more.
101 #[prop_or_default]
102 pub onselected: Callback<SelectedDetail>,
103 /// `WeakComponentLink` for `Menu` which provides the following methods
104 /// - `get_focused_item_index(&self) -> usize`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected