Keep keyboard dismissed for selector sheets
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
||||
ScrollView,
|
||||
Platform,
|
||||
StatusBar,
|
||||
Keyboard,
|
||||
useWindowDimensions,
|
||||
type LayoutChangeEvent,
|
||||
type PressableStateCallbackType,
|
||||
@@ -60,6 +59,7 @@ import {
|
||||
type SheetHeader,
|
||||
} from "@/components/adaptive-modal-sheet";
|
||||
import { FloatingSurface } from "@/components/ui/floating";
|
||||
import { useDismissKeyboardOnOpen } from "@/components/ui/keyboard-dismiss";
|
||||
|
||||
const IS_WEB = isWeb;
|
||||
|
||||
@@ -738,9 +738,6 @@ function applySetOpen(
|
||||
onOpenChange: ((open: boolean) => void) | undefined,
|
||||
nextOpen: boolean,
|
||||
) {
|
||||
if (nextOpen) {
|
||||
Keyboard.dismiss();
|
||||
}
|
||||
if (!isControlled) {
|
||||
setInternalOpen(nextOpen);
|
||||
}
|
||||
@@ -1026,7 +1023,7 @@ function MobileComboboxBody(props: MobileBodyProps): ReactElement {
|
||||
backgroundComponent={ComboboxSheetBackground}
|
||||
handleIndicatorStyle={props.handleIndicatorStyle}
|
||||
keyboardBehavior="extend"
|
||||
keyboardBlurBehavior="restore"
|
||||
keyboardBlurBehavior="none"
|
||||
>
|
||||
{props.header ? (
|
||||
<SheetHeaderView header={props.header} onClose={props.onClose} />
|
||||
@@ -1486,6 +1483,7 @@ export function Combobox({
|
||||
);
|
||||
|
||||
useWebKeyboardListener(isOpen, handleDesktopKey);
|
||||
useDismissKeyboardOnOpen(isOpen, isMobile);
|
||||
|
||||
const handleIndicatorStyle = useMemo(
|
||||
() => ({ backgroundColor: theme.colors.palette.zinc[600] }),
|
||||
|
||||
Reference in New Issue
Block a user