You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got the same issue when I'm adding TextInput to handleComponent prop, you should somehow try moving TextInput from footerComponent and place it inside children
I've got the same issue when I'm adding TextInput to handleComponent prop, you should somehow try moving TextInput from footerComponent and place it inside children
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS, Android
What happened?
When typing keyboard gets closed
Reproduction steps
const [comment, setComment] = useState<string | undefined>(undefined);
const renderFooter = useCallback(
props => {
return (
<BottomSheetFooter style={styles.footerContainer} {...props}>
{reply && (
<View
style={[
commonStyles.flexContainer,
{marginBottom: theme.spacing?.sm, marginLeft: 45},
]}>
<Typography
isLight
style={{
color: theme.COLORS?.PRIMARY,
width: '91%',
}}>
Replying to {reply?.userId}
<TouchableOpacity
onPress={() => {
setReply(undefined);
setComment(undefined);
}}>
)}
<View
style={[commonStyles.flexContainer, {gap: theme.spacing?.sm}]}>
<Avatar
rounded
source={{
uri: user?.profilePicture!,
}}
/>
<View
style={[commonStyles.flexContainer, styles.footerInputSubView]}>
<BottomSheetTextInput
ref={inputRef}
style={styles.footerTextInput}
placeholder="Add comment"
placeholderTextColor={theme.COLORS?.TEXT_GRAY}
value={comment}
onChangeText={value => {
if (reply) {
const temp = reply?.userId?.replace(' ', '');
if (extractUserId(value) !== temp) {
setReply(undefined);
}
}
setComment(value);
}}
/>
{!postCommentLoading ? (
<TouchableOpacity
style={{marginTop: 8}}
disabled={comment ? false : true}
onPress={postComment}
// onPress={cleanComment}
>
) : (
<ActivityIndicator
color={theme.COLORS?.PRIMARY}
size={'small'}
/>
)}
);
},
[comment, postCommentLoading, reply, user],
);
Reproduction sample
https://snack.expo.dev/@abdulpropelius/bottom-sheet---issue-reproduction-template
Relevant log output
The text was updated successfully, but these errors were encountered: