Skip to content

TreeView - Can not put LabelGroup in expandable TreeViewItem due to nested button elements #6

@ianw

Description

@ianw

I have made a TreeView with item.name as a more complex object, where I wanted to use a LabelGroup within it; but this leads to

Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>.

A screenshot is below

image

I guess the problem here is that the expandable-row (pf-c-tree-view__node above) from the TreeView is made with a button (highlighed above), but then the LabelGroup wants to use a button to have the group expansion too; e.g.

image

A suggestion might be that the TreeView should somehow be implemented with a div/onclick instead of a button to give a bit more flexibility to the internal tree view elements?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions