support removing attributes from animated elements
Why
inert does not accept inert='', inert='false', inert='undefined' or etc. The attribute must be entirely removed in order to enable the element again. disabled works the same way.
What
If a value resolves to undefined (not null or false or otherwise) its attribute will now be entirely removed.
Checklist
- [x] Ready to be merged
🦋 Changeset detected
Latest commit: 66bf995efd91371678172d888f1c2a0704961bf2
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 11 packages
| Name | Type |
|---|---|
| @react-spring/web | Patch |
| @react-spring/animated | Patch |
| @react-spring/core | Patch |
| @react-spring/parallax | Patch |
| @react-spring/rafz | Patch |
| @react-spring/shared | Patch |
| @react-spring/types | Patch |
| @react-spring/konva | Patch |
| @react-spring/native | Patch |
| @react-spring/three | Patch |
| @react-spring/zdog | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| react-spring | ✅ Ready (Inspect) | Visit Preview | Jun 13, 2024 2:41pm |
I suppose right now it's impossible for a spring value to even be null or undefined without an interpolation (at least when using useSpring), because of #2295. I'm off work for the week, so I can look into this more next Monday (especially since writing brand new tests will probably require me to clone/install everything anyway).
@LoganDark can you rebase this please? :)
oh oops I didn't realize I had another PR open, lmao, one moment
looks like I can't reopen this without making a new one so I will make a new one
#2319