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 #85: tooltip slot prop type error #93

Closed
wants to merge 1 commit into from

Conversation

mateuszlewko
Copy link

Passing the same properties indecently of tooltip presence will make it correctly infer types.

Passing the same properties indecently of tooltip presence will make it correctly infer types.
Copy link

changeset-bot bot commented Jan 19, 2024

⚠️ No Changeset found

Latest commit: 212a9d0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 19, 2024

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

Name Status Preview Comments Updated (UTC)
layerchart ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 4:55pm

@techniq
Copy link
Owner

techniq commented Jan 19, 2024

Thanks @mateuszlewko. The tooltip in passed in this case would be the tooltip props passed to <Chart>, and not the tooltip slot prop from <TooltipContext let:tooltip>...

image

This does bring up a good point though, I wonder to fix the type error, if simply passing...

<slot tooltip={null}>

would fix the type error, but also let you know it can be null if not passing <Chart tooltip={..}>.

Copy link
Owner

@techniq techniq left a comment

Choose a reason for hiding this comment

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

See comment

@techniq
Copy link
Owner

techniq commented Mar 18, 2024

Fixed in 0.33.0 via 10a9468. See also: 6399d54

@techniq techniq closed this Mar 18, 2024
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.

2 participants