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

Pass ref to a TableExpandRow component on React #9443

Closed
martinscooper opened this issue Aug 9, 2021 · 2 comments · Fixed by #14950
Closed

Pass ref to a TableExpandRow component on React #9443

martinscooper opened this issue Aug 9, 2021 · 2 comments · Fixed by #14950
Assignees
Labels
adopter: product Work-stream that directly helps a Product team. component: data-table package: @carbon/react @carbon/react proposal: accepted This request has gone through triaging and we are accepting PR's against it. type: enhancement 💡

Comments

@martinscooper
Copy link

Summary

Please describe your request in one or two sentences.
I am using carbon-components-react. I want to be able to pass a ref to the TableExpandRow component so I can use the scrollIntoView function on a particular row.

Clarify if you are asking for design, development, or both design and
development.
development

Justification

In my case, I have a line chart and a table bellow. Each x-label corresponds to a particular row. I want to let the user press a label and to be redirected to the corresponding table row. For that, I should be able to obtain a reference to the tr tag inside TableExpandRow.

"Must have" functionality

As TableExpandRow is implemented a functional component, a ref can't be pass as a prop unless React.forwardRed is used.

Available extra resources

This issue is similar to #8744.
Also, note that what is suggested here can't be done. Wrapping TableExpandRow inside a div would break a several carbon css selectors.

@sstrubberg sstrubberg moved this to Triage in Roadmap Dec 19, 2022
@sstrubberg sstrubberg moved this from Triage to Icebox in Roadmap Dec 19, 2022
@sstrubberg sstrubberg added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Dec 19, 2022
@sstrubberg sstrubberg moved this from Icebox to Later in Roadmap Feb 23, 2023
@martinscooper
Copy link
Author

@sstrubberg I could work on this, the issue doesn't seem difficult to solve.

@sstrubberg
Copy link
Member

hey @martinscooper, it's all you, my friend! Let us know if you need any support :D

@sstrubberg sstrubberg moved this from Later to Now in Roadmap Jun 2, 2023
@sstrubberg sstrubberg moved this to 📋 Backlog in Community Workgroups Jun 2, 2023
@sstrubberg sstrubberg added proposal: accepted This request has gone through triaging and we are accepting PR's against it. package: @carbon/react @carbon/react adopter: product Work-stream that directly helps a Product team. and removed proposal: open This request has gone through triaging. We're determining whether we take this on or not. package: react carbon-components-react labels Jun 2, 2023
@sstrubberg sstrubberg removed this from Roadmap Aug 10, 2023
@sstrubberg sstrubberg moved this from 📋 Backlog to 🔖 Ready in Community Workgroups Aug 10, 2023
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Community Workgroups Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: product Work-stream that directly helps a Product team. component: data-table package: @carbon/react @carbon/react proposal: accepted This request has gone through triaging and we are accepting PR's against it. type: enhancement 💡
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants