Skip to content

fix: correct elevation when switching modes#3151

Merged
lukewalczak merged 1 commit intomainfrom
fix/button-elevation
Apr 26, 2022
Merged

fix: correct elevation when switching modes#3151
lukewalczak merged 1 commit intomainfrom
fix/button-elevation

Conversation

@lukewalczak
Copy link
Copy Markdown
Member

Fixes: #3137

Summary

Switching button mode from contained to outlined didn't remove the previously set elevation, since elevation was wrongly overwritten by 0 instead of Animated.Value according to the shadow logic.

Test plan

  1. Run the example app
  2. Switch dynamically button mode from contained to outlined - you can use the snack from the issue
  3. Expect there are no issues with elevation on android

@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here

.

@lukewalczak lukewalczak merged commit 60db400 into main Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button component re-renders incorrectly when dynamically updated from contained to outlined

1 participant