mary icon indicating copy to clipboard operation
mary copied to clipboard

Adds optional `exact` attribute on menu items

Open hackeresq opened this issue 6 months ago • 0 comments

The exact attribute requires the link and route to match exactly in order to show as active in a menu.

This leaves the default functionality of fuzzy-ish matching parent routes, but also avoids issues with numeric IDs unintentionally matching (e.g. ID # 1 and ID # 11 should not match).

Example usage:

<x-menu-item title="{{ __('Transactions') }}" icon="o-banknotes" link="####" exact />
//                                                                             ^

Ref: #549

hackeresq avatar Aug 07 '24 03:08 hackeresq