-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove setNextLayoutAnimationGroup
call
#4955
Remove setNextLayoutAnimationGroup
call
#4955
Conversation
Hi, a small question, we now replace
Here is my small test, code modified from issue #4815 App.jsximport { useState } from "react";
import {
StyleSheet,
Text,
TextInput,
View,
Keyboard,
KeyboardAvoidingView,
LayoutAnimation,
} from "react-native";
import Animated, { Layout, FadeInUp, FadeOutUp } from "react-native-reanimated";
const SET_TRUE_TO_REPRO = false;
export default function App() {
const [focused, setFocused] = useState(false);
return (
<KeyboardAvoidingView style={{ flex: 1 }} enabled={SET_TRUE_TO_REPRO}>
<View
style={styles.container}
onTouchEnd={() => focused && Keyboard.dismiss()}
>
<Text>Open up App.js to start working on your app!</Text>
<Animated.View
layout={Layout.duration(150)}
style={{ backgroundColor: "red", width: focused ? 300 : 100 }}
>
<TextInput
style={{ backgroundColor: "blue", width: 50 }}
onFocus={() => setFocused(true)}
onBlur={() => {
setFocused(false);
setTimeout(() => {
LayoutAnimation.configureNext({
duration: 30,
});
}, 1000);
}}
/>
</Animated.View>
</View>
</KeyboardAvoidingView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
}); test.mp4 |
@ntdiary Thanks for pointing out this problem as well as providing a repro. Looks like the fix which was supposed to resolve this issue doesn't work like expected so we'll need some more time to propose another solution. |
Summary
See Expensify/App#20552 (comment) for details.
Test plan