Function patternfly_yew::hooks::enter::use_on_enter
source · pub fn use_on_enter<'hook, F, D>(
d: D,
f: F
) -> impl 'hook + Hook<Output = Callback<KeyboardEvent>>
Expand description
Create a new callback handling only the case when the user pressed the enter key.
§Note
When used in function components and hooks, this hook is equivalent to:
pub fn use_on_enter<F, D>(d: D, f: F) -> Callback<KeyboardEvent>
where
F: Fn(&D) + 'static,
D: PartialEq + 'static,
{
/* implementation omitted */
}