Skip to content
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

[SideMenu] Changing menu item attributes resets selectOnClick #2081

Closed
glebfox opened this issue Jul 26, 2023 · 0 comments
Closed

[SideMenu] Changing menu item attributes resets selectOnClick #2081

glebfox opened this issue Jul 26, 2023 · 0 comments
Labels
in: ui state: won't fix This will not be worked on type: bug Something isn't working ver: 1 Jmix version 1.x

Comments

@glebfox
Copy link
Contributor

glebfox commented Jul 26, 2023

Case:

  1. Set selectOnClick="true" for the SideMenu component
<sideMenu id="sideMenu"
          selectOnClick="true"
          width="100%"
          stylename="jmix-drawer-content"/>
  1. Add ItemSelectListener that changes some menu item attributes, e.g. icon, stylename, etc.
@Subscribe
public void onInit(final InitEvent event) {
    sideMenu.addItemSelectListener(itemSelectEvent ->
            itemSelectEvent.getMenuItem().setStyleName(RandomStringUtils.randomAlphabetic(5)));
}

AR:
Section is reset, because SideMenu rebuilds the whole menu structure.

AR:
Selection is persists even if menu item attributes are changed.

@glebfox glebfox added type: bug Something isn't working in: ui labels Jul 26, 2023
@gorbunkov gorbunkov added the ver: 1 Jmix version 1.x label Oct 16, 2023
@gorbunkov gorbunkov added this to Backlog in Release 1.5 via automation Dec 15, 2023
@gorbunkov gorbunkov removed this from Backlog in Release 1.5 Feb 14, 2024
@gorbunkov gorbunkov added the state: won't fix This will not be worked on label Feb 14, 2024
@gorbunkov gorbunkov closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: ui state: won't fix This will not be worked on type: bug Something isn't working ver: 1 Jmix version 1.x
Projects
None yet
Development

No branches or pull requests

2 participants