parent
c30b4b0a1c
commit
8c08cce6ff
1 changed files with 36 additions and 27 deletions
|
|
@ -700,10 +700,13 @@ where
|
|||
..
|
||||
} = tree.state.downcast_mut::<Menu<T>>();
|
||||
|
||||
let bounds = layout.bounds();
|
||||
|
||||
self.state.sync_filtered_options(filtered_options);
|
||||
|
||||
if filtered_options.options.is_empty() {
|
||||
None
|
||||
} else {
|
||||
let bounds = layout.bounds();
|
||||
|
||||
let mut menu = menu::Menu::new(
|
||||
menu,
|
||||
&filtered_options.options,
|
||||
|
|
@ -731,7 +734,13 @@ where
|
|||
menu = menu.text_size(size);
|
||||
}
|
||||
|
||||
Some(menu.overlay(layout.position() + translation, bounds.height))
|
||||
Some(
|
||||
menu.overlay(
|
||||
layout.position() + translation,
|
||||
bounds.height,
|
||||
),
|
||||
)
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue