Skip to content

[Menu] Add item disabled option #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[Menu] Add item disabled option #217

wants to merge 3 commits into from

Conversation

cavasinf
Copy link
Collaborator

@cavasinf cavasinf commented Mar 11, 2025

Description

Add item disabled option

        $item1 = new MenuItemModel('item1', 'Item 1');
        $menu->addItem($item1);

        $item2 = new MenuItemModel('item2', 'Item 2');
        $item2->setDisabled(true);
        $menu->addItem($item2);

        $subMenu1 = new MenuItemModel('subMenu1', 'Sub menu 1');
        $subMenu1Item1 = new MenuItemModel('subMenu1Item1', 'Item 1.1');
        $subMenu1->addChild($subMenu1Item1);
        $subMenu1Item2 = new MenuItemModel('$subMenu1Item2', 'Item 1.2');
        $subMenu1Item2->setDisabled(true);
        $subMenu1->addChild($subMenu1Item2);
        $menu->addItem($subMenu1);

        $subMenu2 = new MenuItemModel('subMenu2', 'Sub menu 2');
        $subMenu2->setDisabled(true);
        $subMenu2Item1 = new MenuItemModel('subMenu1Item1', 'Item 2.1');
        $subMenu2->addChild($subMenu2Item1);
        $subMenu2Item2 = new MenuItemModel('$subMenu1Item2', 'Item 2.2');
        $subMenu2Item2->setDisabled(true);
        $subMenu2->addChild($subMenu2Item2);
        $menu->addItem($subMenu2);

Bundle:
image

Tabler:
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I updated the documentation (see here)
  • I agree that this code will be published under the MIT license

@cavasinf cavasinf added Status: Needs Review Not under investigation Feature Feature requested labels Mar 11, 2025
@cavasinf cavasinf marked this pull request as ready for review March 11, 2025 10:53
@kevinpapst kevinpapst added the BC Break This will cause BC Break label May 27, 2025
@cavasinf
Copy link
Collaborator Author

cavasinf commented May 27, 2025

@kevinpapst This can be added before the next milestone, why BC BREAK ?

Edit : Ahhh maybe due to the href that is dynamic now?

@cavasinf cavasinf added this to the 2.0 milestone May 27, 2025
@kevinpapst
Copy link
Owner

This one changes an interface. Easy to fix, but still a BC break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break This will cause BC Break Feature Feature requested Status: Needs Review Not under investigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants