feat: enable 'handled' mode of ScrollView['keyboardShouldPersistTaps']#1141
feat: enable 'handled' mode of ScrollView['keyboardShouldPersistTaps']#1141berickson1 merged 1 commit intomicrosoft:masterfrom mikehardy:keyboardShouldPersistTaps-enum
Conversation
|
Okay @berickson1 - I just edited and re-pushed based on your feedback. I re-read your comment a few times about the override, and I believe my original understanding was incomplete. I believe you were saying if someone sets override it should always override (though you qualified your confidence in that - that's fine) 1- so in my re-structure I made the override a 100% thing via the 'else if' vs just 'if' as you mentioned Then I built it and patched it into my project and I can to see the single-tap ability to hit buttons inside scrollviews on native when I pass in 'handled' for this prop now, which makes me happy. |
|
LGTM - Can you also update scrollview.md with the updated properties? |
This enables tap events to go through the ScrollView and trigger onPress on Touchable things inside the ScrollView. So while the keyboard is showing in a TextInput inside a ScrollView and you tap a button, the button will actually tap instead of needing one tap to dismiss keyboard, and one tap on the button
|
Oops! forgot the docs, good catch. Just repushed |
|
Yay! Now we just need a reactxp-2.0.0-rc.2 and I can purge my patch-package patch :-) |
This enables tap events to go through the ScrollView and trigger onPress
on Touchable things inside the ScrollView.
So while the keyboard is showing in a TextInput inside a ScrollView and you tap a button, the button will actually tap instead of needing one tap to dismiss keyboard, and one tap on the button
You guys have a pretty concise style and my Typescript Typing skills are not very strong yet, so if there is anything stylistic about this you don't like, just let me know.
Side note: if you disregard the package-lock.json right now (e.g. by using yarn instead of npm) current master fails to compile with tsc. I'm assuming some underlying type package moved and Button and View no longer have compatible Animated Style types. Using
npm installdoes work though and after that install ayarn buildis successful, and I can transplant the src+dist directories to my project's node_modules for patch-package consumption where I can deploy my work.