fix: MenuActive path highlight

This commit is contained in:
Ashley Wulber 2026-03-27 15:06:22 -04:00 committed by Michael Murphy
parent a38a6f5d73
commit e63f3196e2

View file

@ -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