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

Ensures key is properly propagated to importedElements #1271

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

shawncrawley
Copy link
Contributor

@shawncrawley shawncrawley commented Feb 10, 2025

Fixes #1270. The "key" prop was being lost in the trickle-down of importedElements.

Description

I just added a block of code to the createAttributes function to check if the "key" is part of the vdom model and if so, to add it to the attributes. There may be a better and more thorough way to do this higher up the call chain, but this fixed the issue for me in my use case (see #1270).

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

The "key" prop was being lost in the trickle-down of importedElements.
@Archmonger Archmonger changed the base branch from main to develop February 10, 2025 16:25
@Archmonger
Copy link
Contributor

Can you add a test for this within src/reactpy/tests/test_web/test_module.py?

You can directly use the GridLayout component if you'd like.

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.

The key attribute is not being properly propagated and applied to importedElements
2 participants