Struct patternfly_yew::GlobalClose
source · [−]pub struct GlobalClose { /* private fields */ }
Expand description
Helper to trigger a close operation, when the user clicks on the global space.
This can be e.g. used for a drop down menu, where the component should be closed when the user clicks outside of the dropped down content.
In order to use this, you need to define and assign the NodeRef
to an element which is
considered the “inside”. When the user clicks “outside” of the referenced element, it will
execute the callback.
When the instance is dropped, the callback will no longer be fired.
When creating the structure, you can pass in a new NodeRef
, and you can deref and clone
later using the function GlobalClose::node_ref
.
Implementations
sourceimpl GlobalClose
impl GlobalClose
Methods from Deref<Target = NodeRef>
Trait Implementations
sourceimpl Deref for GlobalClose
impl Deref for GlobalClose
Auto Trait Implementations
impl !RefUnwindSafe for GlobalClose
impl !Send for GlobalClose
impl !Sync for GlobalClose
impl Unpin for GlobalClose
impl !UnwindSafe for GlobalClose
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
sourcepub fn into_prop_value(self) -> Option<T>
pub fn into_prop_value(self) -> Option<T>
Convert self
to a value of a Properties
struct.
sourceimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
sourcepub fn into_prop_value(self) -> T
pub fn into_prop_value(self) -> T
Convert self
to a value of a Properties
struct.