We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f81eebc commit 9b37692Copy full SHA for 9b37692
src/components/Button/Button.tsx
@@ -227,7 +227,13 @@ const Button = (
227
);
228
229
React.useEffect(() => {
230
- elevation.setValue(isElevationEntitled ? initialElevation : 0);
+ // Workaround not to call setValue on Animated.Value, because it breaks styles.
231
+ // https://github.com/callstack/react-native-paper/issues/4559
232
+ Animated.timing(elevation, {
233
+ toValue: isElevationEntitled ? initialElevation : 0,
234
+ duration: 0,
235
+ useNativeDriver: true,
236
+ });
237
}, [isElevationEntitled, elevation, initialElevation]);
238
239
const handlePressIn = (e: GestureResponderEvent) => {
0 commit comments