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

`setSprings` sets opacity wrongly

Open ChristopherMillon opened this issue 6 years ago • 3 comments

🐛 Bug Report

setSprings sets the opacity of an element to 1 when it shouldn't (as its been asked to set it to 0)

To Reproduce

Use setSprings and set only one item to have an opacity of 1. (In my example it's a carousel and the issue happens when I increment an index.)

Expected behavior

setSprings should apply the proper opacity each item has been assigned.

Link to repro (highly encouraged)

https://codesandbox.io/s/tender-hypatia-6wpqp

Environment

  • "react": "16.8.6",
  • "react-dom": "16.8.6",
  • "react-scripts": "3.0.0",
  • "react-spring": "^9.0.0-beta.34",
  • "react-use-gesture": "^7.0.0-beta.6"

ChristopherMillon avatar Jan 04 '20 18:01 ChristopherMillon

Weirdly enough, it doesn't happen in codesandbox.io

ChristopherMillon avatar Jan 04 '20 18:01 ChristopherMillon

Please try with the latest canary. 👍

aleclarson avatar Jan 04 '20 18:01 aleclarson

That fixed it, thanks a lot 👍

ChristopherMillon avatar Jan 04 '20 18:01 ChristopherMillon