Skip to main content

use_close_menu_callback

Function use_close_menu_callback 

Source
pub fn use_close_menu_callback<'hook>() -> impl 'hook + Hook<Output = Callback<()>>
Expand description

Provide a stable callback for closing the menu.

NOTE: If the hook is used inside a component which is not wrapped with a component providing a CloseMenuContext, then all operations become a no-op.

ยงNote

When used in function components and hooks, this hook is equivalent to:

/// Provide a stable callback for closing the menu.
///
/// **NOTE**: If the hook is used inside a component which is not wrapped with a component
/// providing a [`CloseMenuContext`], then all operations become a no-op.
pub fn use_close_menu_callback() -> Callback<()> {
    /* implementation omitted */
}