react-spring icon indicating copy to clipboard operation
react-spring copied to clipboard

support removing attributes from animated elements

Open LoganDark opened this issue 1 year ago • 3 comments

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

LoganDark avatar Jun 13 '24 14:06 LoganDark

🦋 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

changeset-bot[bot] avatar Jun 13 '24 14:06 changeset-bot[bot]

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

vercel[bot] avatar Jun 13 '24 14:06 vercel[bot]

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 avatar Jun 25 '24 09:06 LoganDark

@LoganDark can you rebase this please? :)

joshuaellis avatar Sep 16 '24 15:09 joshuaellis

oh oops I didn't realize I had another PR open, lmao, one moment

LoganDark avatar Sep 16 '24 15:09 LoganDark

looks like I can't reopen this without making a new one so I will make a new one

LoganDark avatar Sep 16 '24 15:09 LoganDark

#2319

LoganDark avatar Sep 16 '24 15:09 LoganDark