-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
[Bug]: Conflicting data properties between Tooltip and ToggleGroupItem/Toggle #1407
Comments
Thanks for the issue @kilobyte2007 ! This is something we are aware of radix-ui/primitives#602 WDYT? |
Thanks a lot for the answer @zernonia! But there will still be a small breaking change in case someone was relying on the Also thanks for pointing to the issue, the workaround from the last comment there seems to be the most reasonable one until this is fixed. |
For now we can add additional data attribute |
But if we don't remove the data-state attribute from the Tooltip trigger, wouldn't it still overwrite the one from the ones I mentioned? Maybe I am missing something. That was my initial issue. |
You are right @kilobyte2007 ! Perhaps we can leave For the mean time you should be able to use the |
Thanks, that would be the best solution I think, yes! |
Environment
Link to minimal reproduction
Will provide in case more context is needed.
Steps to reproduce
The Tooltip component has a
[data-state]
attribute that is being set on the trigger based on whether the tooltip is open and can be"closed" | "delayed-open" | "instant-open"
.The ToggleGroupItem component has a
[data-state]
attribute which can be"on" | "off"
based on whether an item is pressed.Same for the Toggle component.
Describe the bug
The issue is when I try using a tooltip on a toggle group item, the data-state attribute is not being set correctly.
Not sure what the best solution would be here, but having tooltips on toggle group items, especially the ones with only an icon is pretty important.
Is there an existing solution?
Wrapping the item seems like a solution but not a very elegant one.
Expected behavior
No response
Context & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered: