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

Lendemor/fix backward compat of menu api #1925

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

Lendemor
Copy link
Collaborator

@Lendemor Lendemor commented Oct 5, 2023

follow up to #1905, some issue in MenuList cause hydration error in reflex-web

if not items:
items = []
children.append(MenuList.create(*items))
children.append(MenuList.create(items=items))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the advantage of adding another arg, items, here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's to avoid conflict with the "manual" API where users defined every component by themselves.

(Like in reflex-web where the menu items in the navbar are defined manually.)

@picklelo picklelo merged commit 837549b into main Oct 5, 2023
36 checks passed
@picklelo picklelo deleted the lendemor/fix_backward_compat_of_menu_api branch October 9, 2023 21:06
Lendemor added a commit that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants