Unknown change in dent after blur textInput #509
-
|
Hey, how do you keep the <GeneralSheet
name="general-sheet"
dismissible={false}
ref={generalSheetRef}
detents={[0.12, 0.42, 1]}
onBackPress={handleBackPress}
onDetentChange={handleDetentChange}>
<View
style={{
marginTop: 35,
}}>
<View style={{ paddingHorizontal: 20, paddingBottom: 10 }}>
<SearchBar
placeholder="Search..."
value={localQuery}
onChangeText={handleChangeSearch}
onFocus={() => {
generalSheetRef.current?.resize(2);
console.log('Search focused');
}}
onBlur={() => {
console.log('Search stop focused');
}}
loseFoucusOnKeyboardHide
/>
</View>
<GeneralSheetContent onPressItem={(location) => onPressItemGeneralSheet( location)} />
</View>
</GeneralSheet>GeneralSheet: type GeneratSheetProps = {
name: string;
detents: SheetDetent[];
dismissible: boolean;
onDetentChange: (event: DetentChangeEvent) => void;
onBackPress?: (event: BackPressEvent) => void;
} & PropsWithChildren;
export const GeneralSheet = forwardRef<TrueSheet, GeneratSheetProps>((props, ref) => {
const { colors } = useTheme();
const backgroundColor = useMemo(() => {
console.log('Color has changed ');
return colors.background;
}, [colors]);
useEffect(() => {
console.log('Generate GeneralSheet');
}, []);
return (
<ReanimatedTrueSheet
name={props.name}
scrollable
ref={ref}
detents={props.detents}
dismissible={props.dismissible}
onBackPress={props.onBackPress}
cornerRadius={24}
dimmed={false}
onDetentChange={props.onDetentChange}
initialDetentAnimated
grabber={true}
grabberOptions={{ color: colors.text }}
backgroundColor={backgroundColor}>
{props.children}
</ReanimatedTrueSheet>
);
}); |
Beta Was this translation helpful? Give feedback.
Answered by
lodev09
Feb 11, 2026
Replies: 1 comment 14 replies
-
|
Are you on android? Also what's your use-case? Keyboard is already handled internally so you don't really need manually resize the sheet when an input is focused. Just leave it as-is |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kalwinskidawid try it here: https://github.com/lodev09/react-native-true-sheet/releases/tag/v3.9.0-beta.4