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

Container component mouse events / tooltip stopped working after upgrading react 18 -> 19 #3048

Open
2 tasks done
heinj opened this issue Feb 18, 2025 · 0 comments
Open
2 tasks done
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@heinj
Copy link

heinj commented Feb 18, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Victory version

37.3.6

Code Sandbox link

https://codesandbox.io/p/sandbox/victory-starter-forked-zfh44g?file=%2Fsrc%2FChart.tsx%3A7%2C18

Bug report

Before I was able to drag the chart and tooltip would pop out when nearing the scatter. Also scatters would grow in size when they because "active". After Upgrading to react 19, it seems like all the "pointer" events for the chart stopped working: not able to drag, not seeing the tooltip, scatters wont grow or react to hovering. 
Also the Scatter and Line components started to gave warnings with this typescript version:

'VictoryLine' cannot be used as a JSX component.
  Its instance type '{ state: {}; getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any; getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {}; ... 43 more ...; events: unknown; }' is not a valid JSX element.
    Types of property 'componentWillReceiveProps' are incompatible.
      Type '((nextProps: Readonly<EventMixinCommonProps>, nextContext: any) => void) | undefined' is not assignable to type '((nextProps: Readonly<any>) => void) | undefined'.
        Type '(nextProps: Readonly<EventMixinCommonProps>, nextContext: any) => void' is not assignable to type '(nextProps: Readonly<any>) => void'.typescript(2786)

Steps to reproduce

Expected behavior

Tooltip would pop out near scatter hover, scatters would grow on hover, chart is draggable on x dimension.

Actual behavior

None of the expected (previously working) stuff is happening.

Environment

- Device: desktop
- OS: macOS 15
- Node: 22
@heinj heinj added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior
Projects
None yet
Development

No branches or pull requests

1 participant