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

266 - Fixup tool tip errors #292

Merged
merged 1 commit into from
Mar 3, 2024
Merged

266 - Fixup tool tip errors #292

merged 1 commit into from
Mar 3, 2024

Conversation

EthanMcQ-TMF
Copy link
Collaborator

Closes #266

πŸ‘©πŸ»β€πŸ’» What does this PR do?

Fix console errors that occur when displaying certain tooltips.

πŸ§ͺ How has/should this change been tested?

Loading up the events view and checking the console, you should no longer see tooltip errors.

These errors were also causing the tooltips to fail to display, so you should now be able to hover over date entries and actually see the tooltip

Screenshot 2024-03-01 at 16 41 43 Screenshot 2024-03-01 at 16 45 44

πŸ’Œ Any notes for the reviewer?

πŸ“ƒ Documentation

No user facing changes

Copy link

github-actions bot commented Mar 1, 2024

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.2 MB 5.2 MB 56 B (0.00%)

Comment on lines +56 to +57
<div>
<BaseButton
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mui tooltip expects it's child to accept ref which react function components do not. A simple fix is to just... wrap it in a non-function component

Copy link
Collaborator

@jmbrunskill jmbrunskill left a comment

Choose a reason for hiding this comment

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

Thanks! I didn't realise the reason but fixed something similar recently.
Wrapping in a non-functional component seems to be a good quick fix.

@EthanMcQ-TMF EthanMcQ-TMF merged commit 151a0c4 into main Mar 3, 2024
3 checks passed
@EthanMcQ-TMF EthanMcQ-TMF deleted the 266-fix-tooltip-errors branch March 3, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React forward ref errors with Tooltip
2 participants