aksonov / aksonov/react-native-tabs

Double-tap scroll to top

Open
#39 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
727
Forks
112
PR merge metrics
No merged PRs in 30d

Description

I'm willing to submit a PR for this but I want to make sure the approach I take makes sense.

React-native has an [onAccessibilityTap](https://facebook.github.io/react-native/docs/accessibility.html#onaccessibilitytap-ios) method which lets you define what to do on a double-tap. There's also a [hand-rolled check](https://gist.github.com/mrzmyr/9ac94ca4622c1602a2a3) (that I'm less-inclined to use).

This library is used in [react-native-router-flux](https://github.com/aksonov/react-native-router-flux) and so I'm not sure if it makes sense to create a PR here or there.

Essentially, I'd use `onAccessibilityTap` to fire off [scrollTo()](http://facebook.github.io/react-native/releases/0.32/docs/scrollview.html#scrollto) on the subview that the tab displays.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.