fix: MenuActive path highlight
This commit is contained in:
parent
a38a6f5d73
commit
e63f3196e2
1 changed files with 7 additions and 1 deletions
|
|
@ -765,7 +765,13 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> {
|
|||
PathHighlight::OmitActive => {
|
||||
!indices.is_empty() && i < indices.len() - 1
|
||||
}
|
||||
PathHighlight::MenuActive => self.depth == state.active_root.len() - 1,
|
||||
PathHighlight::MenuActive => {
|
||||
!indices.is_empty()
|
||||
&& i < indices.len()
|
||||
&& menu_roots.len() > indices[i]
|
||||
&& (i < indices.len() - 1
|
||||
|| !menu_roots[indices[i]].children.is_empty())
|
||||
}
|
||||
});
|
||||
|
||||
// react only to the last menu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue