Skip to content

Commit

Permalink
Fix "Active" class in dynamic submenu's (#512)
Browse files Browse the repository at this point in the history
* Fix "Active" class in dynamic submenu's

I'm not really sure what the impact is of this change, but in my case it seem's to fix my issue.

When you use `addIn` to add sub-menu items, the top menu item doesn't get the active class as it should.

* Cleanup. Fix TravisCI
  • Loading branch information
Koozza authored Mar 27, 2020
1 parent 453c3c8 commit c26da68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Menu/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function addItem($itemKey, $direction, ...$newItems)
array_splice($menuItems, $lastKey + ($direction == 'after' ? 1 : 0), 0, $items);
}

Arr::set($this->menu, $arrayPath, $menuItems);
Arr::set($this->menu, $arrayPath, $this->applyFilters($menuItems));
}
}
}
Expand Down

0 comments on commit c26da68

Please sign in to comment.