Skip to content

Issues with multiple submenus with same id #131

@Lynesth

Description

@Lynesth

We currently can add multiple submenus with the same "id"
Example:

$menu = (new CliMenuBuilder)
    ->addSubMenu('Options')
        ->addItem(...)
        ->end()
    ->addSubMenu('Options')
        ->addItem(...)
        ->end()
    ->end()

Both of them work but only the second one has its parent set and can "Go Back" to the main menu.

We either need to prevent adding a menu with the same ID or, even better, handle it differently (maybe like the uniqid that's used with split items ?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions