Fix Default
implementation for pick_list::State
This commit is contained in:
parent
aaf5986123
commit
a225a218e0
@ -30,7 +30,7 @@ where
|
|||||||
/// The local state of a [`PickList`].
|
/// The local state of a [`PickList`].
|
||||||
///
|
///
|
||||||
/// [`PickList`]: struct.PickList.html
|
/// [`PickList`]: struct.PickList.html
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct State<T> {
|
pub struct State<T> {
|
||||||
menu: menu::State,
|
menu: menu::State,
|
||||||
is_open: bool,
|
is_open: bool,
|
||||||
@ -38,6 +38,17 @@ pub struct State<T> {
|
|||||||
last_selection: Option<T>,
|
last_selection: Option<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> Default for State<T> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
menu: menu::State::default(),
|
||||||
|
is_open: bool::default(),
|
||||||
|
hovered_option: Option::default(),
|
||||||
|
last_selection: Option::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, T: 'a, Message, Renderer: self::Renderer>
|
impl<'a, T: 'a, Message, Renderer: self::Renderer>
|
||||||
PickList<'a, T, Message, Renderer>
|
PickList<'a, T, Message, Renderer>
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user