Files
react-native/Libraries
Tim Yung 49b2a6e9cd Pressable: Minimum Press Duration
Summary:
When a `Pressable` has a configured (or the default) `delayPressIn` and no (or the default) `delayPressOut`, tapping very quickly can lead to intantaneous invocation of `onPressIn` and `onPressOut`. The end result is that users may never experience any intended visual press feedback.

This changes `Pressable` to accept (and be preconfigured with a default) **minimum press duration**. The minimum press duration ensures that even if the press is released before `delayPressIn` has elapsed, `onPressOut` will still wait the remaining time up to `minPressDuration` before firing.

Note that setting a non-zero `delayPressOut` is insufficient because if a user holds down on a `Pressable` for longer than `delayPressIn`, we still want `onPressOut` to fire immediately when the press is released.

Changelog:
[General][Changed] - Added `minPressDuration` to `Pressable`.

Reviewed By: TheSavior

Differential Revision: D21614708

fbshipit-source-id: 502f3d8ad6a40e7762435b6df16809c8798dd92c
2020-07-13 23:54:52 +02:00
..
2020-04-07 19:07:19 -07:00
2020-07-08 20:26:50 +02:00
2020-02-28 12:46:49 -08:00
2020-03-30 14:05:27 -07:00
2020-04-07 19:07:19 -07:00
2020-03-27 03:58:39 -07:00
2020-04-07 19:07:19 -07:00
2020-04-07 19:07:19 -07:00
2020-02-28 12:46:49 -08:00
2020-03-30 14:05:27 -07:00
2020-03-30 14:05:26 -07:00
2020-04-07 19:07:19 -07:00
2020-04-08 15:35:18 -07:00
2020-04-07 19:07:19 -07:00
2020-02-21 10:34:40 -08:00