Rename on_selection to on_option_hovered in combo_box

This commit is contained in:
Héctor Ramón Jiménez 2023-07-26 22:36:50 +02:00
parent a0a3cf7eb7
commit e29754f32d
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -89,9 +89,9 @@ where
/// [`ComboBox`] is hovered using the arrow keys.
pub fn on_option_hovered(
mut self,
on_selection: impl Fn(T) -> Message + 'static,
on_option_hovered: impl Fn(T) -> Message + 'static,
) -> Self {
self.on_option_hovered = Some(Box::new(on_selection));
self.on_option_hovered = Some(Box::new(on_option_hovered));
self
}
@ -490,7 +490,7 @@ where
menu.hovered_option = Some(0);
}
if let Some(on_selection) =
if let Some(on_option_hovered) =
&mut self.on_option_hovered
{
if let Some(option) =
@ -502,7 +502,7 @@ where
})
{
// Notify the selection
shell.publish((on_selection)(
shell.publish((on_option_hovered)(
option.clone(),
));
published_message_to_shell = true;
@ -524,7 +524,7 @@ where
menu.hovered_option = Some(0);
}
if let Some(on_selection) =
if let Some(on_option_hovered) =
&mut self.on_option_hovered
{
if let Some(option) =
@ -536,7 +536,7 @@ where
})
{
// Notify the selection
shell.publish((on_selection)(
shell.publish((on_option_hovered)(
option.clone(),
));
published_message_to_shell = true;