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

fix: add forwardRef to ProjectSelect component #6674

Merged

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Mar 22, 2024

Make the tooltip for project selection in the playground work properly again. Right now, it doesn't work due to an error in react refs.

Because we wrap this in a tooltip in the Playground, we need to forward the ref to the underlying component.

This follows the steps outlined in https://mui.com/material-ui/guides/composition/#caveat-with-refs

Because we wrap this in a tooltip in the Playground, we need to forward the ref to the underlying component.

This follows the steps outlined in https://mui.com/material-ui/guides/composition/#caveat-with-refs
Copy link

vercel bot commented Mar 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 9:23am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Mar 22, 2024 9:23am

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: OK

  • Declining Code Health: 0 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅
  • Affected Hotspots: 0 files(s) 🔥

Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene

✅ Improving Code Health:

Comment on lines -33 to -40
export const ProjectSelect: VFC<IProjectSelectProps> = ({
selectedProjects,
onChange,
dataTestId,
sx,
disabled,
}) => {
const { projects: availableProjects } = useProjects();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Complex Method
ProjectSelect:VFC<IProjectSelectProps> is no longer above the threshold for cyclomatic complexity

@thomasheartman thomasheartman merged commit 6025ad0 into main Mar 25, 2024
15 checks passed
@thomasheartman thomasheartman deleted the fix/playground-project-selection-tooltip-not-working branch March 25, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants