-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
Add new anchorSelect
prop to improve how to attach multiple anchors to the same tooltip
#928
Conversation
anchorSelect
to improve how to attach multiple anchors to the same tooltipanchorSelect
prop to improve how to attach multiple anchors to the same tooltip
The code is slightly messy (but still clean enough) in some places given we shouldn't simply remove the provider and Now we just have to update the docs. This will take a bit of work since I'd like to change all |
Also, probably when we remove the Nice! |
`data-tooltip-for` ended up sounding weird to me
3654b4e
to
3209ef6
Compare
3209ef6
to
6742563
Compare
26c23f2
to
be5e3c3
Compare
Looks good to me 🚀 |
Turns out there might've been a much much easier way to do multiple anchors than using the provider.
anchorSelect
should be a CSS selector to find the anchor elements.The aim of this pull request:
anchorId
and point toanchorSelect
(keeping both as regular props might be fine as well).anchorSelect
prop (it's important to keep the API so code using the provider/wrapper still works).[data-tooltip-for='${tooltipId}']
. This way we could have something like v4'sdata-for
attribute.anchorId
and the provider and wrapper have been deprecated.anchorSelect
anddata-tooltip-for
, while pointing out very clearly thatanchorId
has been deprecated.@deprecated
tags.Usage might look something like this: