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

createMenuItems() is not reactive #2752

Closed
Artur- opened this issue Sep 21, 2024 · 0 comments · Fixed by #2753
Closed

createMenuItems() is not reactive #2752

Artur- opened this issue Sep 21, 2024 · 0 comments · Fixed by #2753
Labels
bug Something isn't working hilla Issues related to Hilla

Comments

@Artur-
Copy link
Member

Artur- commented Sep 21, 2024

Describe the bug

createMenuItems() uses data from window.Vaadin.views to render the menu but there is no mechanism that would update the menu hwen window.Vaadin.views changes.

Expected-behavior

Like everything else in React, the menu items should be reactive

Reproduction

window.Vaadin.views["/hello"]={flowLayout: false, lazy:false, loginRequired: false, menu: {title: null},params:{},register:false,rolesAllowed:null, route:'hello', title: 'Hello new view'}

The item appears in the menu on the next re-render, e.g. when navigating. It should appear immediately

System Info

Hilla: 24.5.0.beta1
Flow: 24.5.0.beta1
Vaadin: 24.5.0.beta1
Copilot: 24.5.0.beta1
Frontend Hotswap: Enabled, using Vite
OS: aarch64 Mac OS X 15.0
Java: JetBrains s.r.o. 21.0.3
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant