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

Breaking change in 2.1.14 type system change for Tooltip formatter prop #3008

Closed
ryanolson-aumni opened this issue Oct 11, 2022 · 4 comments
Closed
Labels
bug General bug label P1 High priority issues

Comments

@ryanolson-aumni
Copy link

By changing the type definition (in a patch release!!!) for formatter, our build broke. Our formatter uses (value: string) => JSX.Element and is now an invalid formatter because of the limiting of the formatter to return a ValueType and a NameType or just a ValueType.

It's wrong to do this in a patch version.

Broken in #2924

@daniel-rodrigue
Copy link

Moreover, the goal of a formatter is to provide a different representation for ValueType. In my case I have <Tooltip<number,string> ... /> where the number is an amount (currency). The displayed value of the number is a string and not a number type (e.g. "$1,000.00").

@furrycatherder
Copy link

@cravend

@bennettdams
Copy link
Contributor

bennettdams commented Aug 2, 2023

I think this was fixed via #3618 and is part of the v2.7.0 release.
The original return type ([React.ReactNode, React.ReactNode]) for the custom tooltip formatter is back, which works for me.

@ckifer
Copy link
Member

ckifer commented Aug 2, 2023

Cool going to close this

@ckifer ckifer closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug General bug label P1 High priority issues
Projects
None yet
Development

No branches or pull requests

6 participants