question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animated.ScrollView keyboardShouldPersistTaps with Animated.Node<boolean> doesn't work.

See original GitHub issue

Description

when providing an Animated.Node for keyboardShouldPersistTaps for a ScrollView doesn’t work. it’ll always be ‘never’.

for example

<ScrollView 
	scrollEnabled={cond(x, false, false)}
    keyboardShouldPersistTaps={cond(x, 'always', 'always' )}
...>
....

the scroll will be disabled but keyboardShouldPersistTaps has no effect.

https://snack.expo.io/@aeid/jealous-cheese

expected behavior:

<ScrollView 
    keyboardShouldPersistTaps={A.Node<'Always'>}.. 

should behave the same as

<ScrollView 
      keyboardShouldPersistTaps={'Always'}.. 
  • React: 16.11.0
  • React Native: 0.62.2
  • React Native Reanimated: ^1.13.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jakub-gonetcommented, Dec 11, 2020

I’m recently more focused on the TS rewrite of RNGH and I didn’t have time to check this.

Maybe @zrebcu411 or @piaskowyk have some time to check it?

0reactions
kmagieracommented, Jan 28, 2022

Closing this in favor of #1526 where the issue related to keyboardShouldPersistTaps is discussed as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-keyboard-aware-scroll-view - npm
A React Native ScrollView component that resizes when the ... scrollToEnd, animated?: bool = true, Scroll to end with or without animation.
Read more >
react-native Animated node error - Stack Overflow
I solved this error by turning off native animation drivers for Android. I'm not sure this is the one true answer, but it...
Read more >
React.Basic.Native - Pursuit - PureScript
On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't...
Read more >
https://cdn.jsdelivr.net/npm/@types/react-native@0...
export interface LayoutAnimationStatic { /** Schedules an animation to happen ... Only works with multiline={true} */ scrollEnabled?: boolean | undefined; ...
Read more >
https://unpkg.com/@types/react-native@0.42.11/inde...
As always, to obtain a native node handle for a component, you can use * `React. ... export interface LayoutAnimationStatic { /** Schedules...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found