Skip to content

Commit

Permalink
fix: Scrollview keyboardShouldPersistTaps fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-iv-am committed Oct 17, 2024
1 parent 2fbeaf9 commit 68c3ed2
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/components/common/CustomPicker.res
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ let make = (
<Space />
<FlatList
ref={pickerRef->ReactNative.Ref.value}
keyboardShouldPersistTaps={#handled}
data={items->Array.filter(x =>
x.name
->String.toLowerCase
Expand Down
1 change: 1 addition & 0 deletions src/components/common/CustomView.res
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module Wrapper = {
let {bgColor} = ThemebasedStyle.useThemeBasedStyle()

<Animated.ScrollView
keyboardShouldPersistTaps={#handled}
style={array([
viewStyle(~flexGrow=1., ~width, ~minHeight=250.->dp, ~padding=20.->dp, ()),
bgColor,
Expand Down
4 changes: 3 additions & 1 deletion src/components/elements/Klarna.res
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ let make = (
}

<ScrollView
pointerEvents=#none style={Style.viewStyle(~height=220.->Style.dp, ~borderRadius=15., ())}>
keyboardShouldPersistTaps=#handled
pointerEvents=#none
style={Style.viewStyle(~height=220.->Style.dp, ~borderRadius=15., ())}>
{React.array(
Array.map(paymentMethods, paymentMethod => {
<KlarnaModule
Expand Down
1 change: 1 addition & 0 deletions src/components/elements/ScrollableCustomTopBar.res
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ let make = (
<View style={viewStyle(~height, ())}>
<FlatList
ref={flatlistRef->ReactNative.Ref.value}
keyboardShouldPersistTaps={#handled}
data=hocComponentArr
style={viewStyle(~flex=1., ~width=100.->pct, ())}
showsHorizontalScrollIndicator=false
Expand Down
1 change: 1 addition & 0 deletions src/pages/hostedCheckout/HostedCheckout.res
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ let make = () => {

<View style={array([viewStyle(~flex=1., ()), bgColor])}>
<ScrollView
keyboardShouldPersistTaps={#handled}
showsHorizontalScrollIndicator={false}
contentContainerStyle={viewStyle(~flexGrow=1., ~paddingBottom=40.->dp, ())}>
<View style={array([parentViewStyle, viewStyle(~flex=1., ~marginHorizontal=15.->dp, ())])}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/payment/SavedPMListWithLoader.res
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ let make = (

allApiData.savedPaymentMethods == Loading
? <LoadingPmList />
: <ScrollView>
: <ScrollView keyboardShouldPersistTaps=#handled>
{listArr
->Array.mapWithIndex((item, i) => {
<SaveCardsList.PaymentMethodListView
Expand Down
1 change: 1 addition & 0 deletions src/pages/payment/SavedPaymentScreenChild.res
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ let make = (
/>
</>
: React.null}
<Space height=12. />
</>
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ let make = () => {
</View>
: savedMethods->Array.length > 0
? <View style={viewStyle(~backgroundColor=component.background, ~height=100.->pct, ())}>
<ScrollView>
<ScrollView keyboardShouldPersistTaps=#handled>
{savedMethods
->Array.mapWithIndex((item, i) => {
<PaymentMethodListItem
key={i->Int.toString}
pmDetails={item}
handleDelete=handleDeletePaymentMethods
key={i->Int.toString} pmDetails={item} handleDelete=handleDeletePaymentMethods
/>
})
->React.array}
Expand Down

0 comments on commit 68c3ed2

Please sign in to comment.