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.

Add prop to disable touch scrolling

See original GitHub issue

Hi, and thank you for this component! I’m re-purposing it for a multi-page form and I think two relatively small changes would do it:

  1. It would be great to be able to pass a scrollEnabled={false} prop such that touch scrolling is disabled.
  2. In order to work with #1, having an exposed function onNext which by default is just: () => true by default, but could be over-ridden with a function that returns a boolean. On false, the slide is not advanced.

These two combined will allow for form validation on the current page!

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
Jacsecommented, Nov 1, 2018

Since 4aeca4a780c543ab667e724ed0885ca9dd1e0197 the library simply extends flatlist, so you can pass scrollEnabled to it easily. At the same time, you can use custom renderbutton functions to enable/disable buttons.

0reactions
Jacsecommented, Jul 19, 2018

How about passing all props to the underlying FlatList, e.g. scrollEnabled?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable scrolling and re-enable scrolling on a mobile ...
Try this code : var scroll = true $(document).bind('touchmove', function(){ scroll = false }).unbind('touchmove', function(){ scroll = true }) ...
Read more >
touch-action - CSS: Cascading Style Sheets - MDN Web Docs
The most common usage is to disable all gestures on an element (and its non-scrollable descendants) that provides its own dragging and zooming ......
Read more >
libinput - ArchWiki
Tips and tricks · Tapping button re-mapping · Manual button re-mapping · Change touchpad sensitivity · Disable touchpad · Gestures · Scroll with...
Read more >
Gesture options - @use-gesture documentation
touch -action: none is a common CSS property that you'll set on draggable items so that scroll doesn't interfere with the drag behavior...
Read more >
Virtual Scroll - Quasar Framework
Dessert (100g serving) Calories Fat (g) Carbs (g) Protein (g) Sodium (mg) Ca... Index: 4994 Cupcake 305 3.7 67 4.3 413 3% Index: 4995 Gingerbread...
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