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

react-tooltip's version update makes the mousehover display part don't work #202

Open
yaya3939 opened this issue Jan 11, 2023 · 4 comments

Comments

@yaya3939
Copy link

react-tooltip have update to v5, and the version used in demo is 3.8.x. doesn't exist anymore. I have see the doc of new version. I use instead of , "data-tooltip-content" instead of "data-tip". But it still don't work. How can I fix it?
Sorry for my poor English, hope you can andersand my question.

@splurgebudget
Copy link

Same problem here - any fixes?

@tacrew
Copy link

tacrew commented Sep 5, 2023

You should additionally provide data-tooltip-id attribute as the react-tooltip docs indicates
https://react-tooltip.com/docs/upgrade-guide/basic-examples-v4-v5

@Sanjuchilukuri
Copy link

Sanjuchilukuri commented Sep 1, 2024

Yeah, same problem any fixes?


import { Tooltip as ReactToolTip } from 'react-tooltip';
<div>
        <CalendarHeatmap
          startDate={new Date('2024-01-01')}
          endDate={new Date('2024-12-31')}
          showMonthLabels={true}
          showWeekdayLabels={true}
          tooltipDataAttrs={({ date, count }: { date: string, count: number }) => ({
            'data-tooltip-id':"my-tooltip",
            'data-tooltip-content':`${date}: ${count} applications`,
          })}
          values={[
            { date: '2024-01-01', count: 12 },
            { date: '2024-01-22', count: 122 },
            { date: '2024-01-30', count: 38 },
            // ...and so on
          ]}
        />
        <ReactToolTip />
      </div>

@Sanjuchilukuri
Copy link

finally, got it. I am giving my reference link here. if anyone has doubts, they can check it.

Link

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

No branches or pull requests

4 participants