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

EuiTreeView with node label or EuiListGroup as Tree #3890

Closed
clintandrewhall opened this issue Aug 11, 2020 · 1 comment
Closed

EuiTreeView with node label or EuiListGroup as Tree #3890

clintandrewhall opened this issue Aug 11, 2020 · 1 comment

Comments

@clintandrewhall
Copy link
Contributor

Problem

We've had multiple instances where we've needed an expanding tree whose items contain more than just a text label. Examples might include a tree with items with two or three button actions, a tooltip, code, etc.

EuiTreeView expands like a tree, but can only accept a string label.
EuiListGroup accepts complex items, but cannot expand like a tree.

Proposals

  1. Refactor EuiTreeView to accept a React child. The label would then become the aria-label of the item.
  2. Refactor EuiListGroupItem to accept both a React node label as well as a EuiListGroup child.
  3. Create a new EuiListGroupItem, e.g. EuiListGroupTreeItem, which would accept some new configuration.

I'd prefer Option 2, as it seems the most pragmatic, but I'm open to other ideas and discussion. Thanks!

@clintandrewhall clintandrewhall changed the title EuiTreeView with node label vs EuiListGroup as Tree EuiTreeView with node label or EuiListGroup as Tree Aug 11, 2020
@snide snide mentioned this issue Mar 9, 2021
41 tasks
@cchaos
Copy link
Contributor

cchaos commented Mar 10, 2021

#4352 Changed the label prop from string to ReactNode

@cchaos cchaos closed this as completed Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants