Skip to content

Options of CompositeMenuNode are not actually updated in updateOptions #12948

@ndoschek

Description

@ndoschek

Bug Description:

In my use case, I want to reuse the context menu to configure an element.
This is done via a toggleable menu item.
To improve usability, I want to propagate the configuration state to its containing parent submenu by adding an iconClass.
I noticed, that the updateOptions function in the CompositeMenuNode only updates a node's options via the nullish coalescing operator.
As a result, my submenus are not correctly updated if the configuration changes, as the icon option is never reset, even if the updated option object would set the iconClass explicitly to undefined.

I suggest to actually update the options as indicated in the function name, not only if the option values are nullish, do you agree?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions