Skip to content

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

Description

@Archmonger

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.

returnGridLayout(
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")
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-2-moderateShould be resolved on a reasonable timeline.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions