react-native-actions-sheet icon indicating copy to clipboard operation
react-native-actions-sheet copied to clipboard

Keyboard.Dismiss not working

Open AyoCodess opened this issue 1 year ago • 0 comments

i want to dismiss the keyboard if it is open by clicking anywhere on the action sheet but it'a not working with TouchableWithoutFeedback, any ideas?

   <ActionSheet
      keyboardHandlerEnabled
      safeAreaInsets={insets}
      elevation={elevation}
      enableGesturesInScrollView={enableGesturesInScrollView}
      gestureEnabled={gestureEnabled}
      overlayColor={overlayColor}
      closable={closable}
      containerStyle={{
        display: 'flex',
        zIndex: 10,
        borderTopLeftRadius: 20,
        borderTopRightRadius: 20,
        ...containerStyle
      }}
      useBottomSafeAreaPadding={useBottomSafeAreaPadding}
      id={sheetId}>
      <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
        <>
          {!scroll && children}
          {scroll && (
            <ScrollView keyboardShouldPersistTaps={'handled'}>
              {children}
            </ScrollView>
          )}
        </>
      </TouchableWithoutFeedback>
    </ActionSheet>

AyoCodess avatar Apr 25 '24 20:04 AyoCodess