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

The key attribute is not being properly propagated and applied to importedElements #1275

Open
Archmonger opened this issue Feb 11, 2025 · 0 comments · Fixed by #1271
Open
Labels
priority-2-moderate Should be resolved on a reasonable timeline.

Comments

@Archmonger
Copy link
Contributor

Discussed in #1270

Originally posted by shawncrawley February 10, 2025
I could not get GridLayout to work as a dynamically loaded component. After digging into the issue, I found that it was because the children of a GridLayout must have the key attribute, but it is not being found on the children when constructing the GridLayout object on the client side. I am clearly passing it in on the Python side, as seen in my example below, so it is getting dropped/lost somewhere.

return GridLayout(
    Props(
        className="layout",
        layout=layout,
        cols=12,
        rowHeight=30,
        width=1200,
    ),
    lib.html.div(Props(key="a"), "a"),
    lib.html.div(Props(key="b"), "b"),
    lib.html.div(Props(key="c"), "c")
)
@Archmonger Archmonger linked a pull request Feb 11, 2025 that will close this issue
4 tasks
@Archmonger Archmonger added the priority-2-moderate Should be resolved on a reasonable timeline. label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-2-moderate Should be resolved on a reasonable timeline.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant