Fix Default implementation for pick_list::State
This commit is contained in:
parent
aaf5986123
commit
a225a218e0
1 changed files with 12 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ where
|
|||
/// The local state of a [`PickList`].
|
||||
///
|
||||
/// [`PickList`]: struct.PickList.html
|
||||
#[derive(Debug, Clone, Default)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct State<T> {
|
||||
menu: menu::State,
|
||||
is_open: bool,
|
||||
|
|
@ -38,6 +38,17 @@ pub struct State<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>
|
||||
PickList<'a, T, Message, Renderer>
|
||||
where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue