pub struct DropdownMenuResponse {
pub response: Response,
pub selected: Option<usize>,
pub clicked_outside: bool,
pub checkbox_toggled: Option<(usize, bool)>,
pub radio_selected: Option<(String, String)>,
pub is_open: bool,
}Expand description
Response from showing a dropdown menu
Fields§
§response: ResponseThe UI response
selected: Option<usize>Index of selected/clicked item (if any)
clicked_outside: boolWhether the user clicked outside the menu
checkbox_toggled: Option<(usize, bool)>Checkbox that was toggled: (index, new_checked_state)
radio_selected: Option<(String, String)>Radio item that was selected: (group_name, value)
is_open: boolWhether the menu is currently open
Implementations§
Source§impl DropdownMenuResponse
impl DropdownMenuResponse
Sourcepub fn is_selected(&self, index: usize) -> bool
pub fn is_selected(&self, index: usize) -> bool
Check if a specific item index was selected
Auto Trait Implementations§
impl Freeze for DropdownMenuResponse
impl !RefUnwindSafe for DropdownMenuResponse
impl Send for DropdownMenuResponse
impl Sync for DropdownMenuResponse
impl Unpin for DropdownMenuResponse
impl UnsafeUnpin for DropdownMenuResponse
impl !UnwindSafe for DropdownMenuResponse
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