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

v1.7.8 breaks non-string classNames #2399

Closed
relative opened this issue Mar 27, 2023 · 3 comments · Fixed by #2412
Closed

v1.7.8 breaks non-string classNames #2399

relative opened this issue Mar 27, 2023 · 3 comments · Fixed by #2412
Assignees

Comments

@relative
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.7.13 (occurs in @‌insiders, appeared in @‌1.7.8)

What browser are you using?

N/A

Reproduction URL

https://github.com/relative/headlessui-repro

Describe your issue

Starting in commit aac78d52b7d066d6cfe507c67a7bb4e4567d7ce5, src/utils/render.ts will now stringify classNames in the render function used by many Headless UI components

This breaks components that allow functions to be passed to classNames, e.g. react-router-dom's NavLink as described in #2317.

@thecrypticace
Copy link
Contributor

Hey! Thanks for reporting this one — completely missed this possibility. I've merged the fix for this in #2412.

Could you give the latest insiders build a test to see if it's fixed for you? It'll take a couple of minutes for the new version to publish

npm install @headlessui/react@insiders

@relative
Copy link
Author

relative commented Apr 3, 2023

looks like it is fixed! thank you

@thecrypticace
Copy link
Contributor

Fantastic! The fix will go out in a tagged release soon.

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 a pull request may close this issue.

2 participants