Commit Graph

826 Commits

Author SHA1 Message Date
Steven Kabbes
141a3a1c0a Remove unused code addNavigationHelpers (#4179) 2018-05-09 16:53:06 -05:00
Brent Vatne
4c01e178cf Release 2.0.1 2018-05-08 17:45:02 -07:00
Eric Vicenti
4a845a3a77 Fix dispatch implementation (#4168)
Previously we had been emiting an action event with a null state when the router handles the action by returning null from getStateForAction.

- Fixes the case of null state getting emitted
- Renames a few things for clarity
- Refactors conditionals to read easier
- Comments to explain intent
2018-05-08 17:41:08 -07:00
Brent Vatne
04072560da Release 2.0.0 2018-05-07 13:47:13 -07:00
Brent Vatne
6f80d22320 Release 2.0.0-rc.14 2018-05-07 13:03:21 -07:00
Brent Vatne
963b567c12 Update drawer example 2018-05-07 13:01:22 -07:00
Eric Vicenti
98fd650c35 Navigation Action Helpers at root (#4151) 2018-05-07 12:56:35 -07:00
Brent Vatne
6c093979d7 Release candidate lucky number 13 2018-05-07 11:54:50 -07:00
Brent Vatne
34cde827cf Only blur input when index changes on transition start (Fixes #4148) 2018-05-07 11:47:56 -07:00
Brent Vatne
a3aa513742 Release 2.0.0-rc.12 2018-05-07 11:14:03 -07:00
Brent Vatne
f1205e02f7 Update react-navigation-deprecated-tab-navigator. Closes #4147 2018-05-07 11:13:34 -07:00
Brent Vatne
638ac6cb44 Release 2.0.0-rc.11 2018-05-06 13:41:53 -07:00
spaceye
f9816ef6a5 Fix for broken swipe back gesture in RTL mode (#4119)
* 3127: Fixed gestureDirectionInverted variable declaration and condition in onPanResponderMove method in regards to swipe back action in RTL mode.

* - 4118: Put axis check first;
- Fixed default BackButton mask in RTL mode.
2018-05-06 22:42:22 +03:00
Brent Vatne
9b287ec144 Release 2.0.0-rc.10 2018-05-06 12:00:02 -07:00
Eric Vicenti
b54d2196d0 Fixes to drawer router handling of child routers (#4131)
Addresses #4129, and also lets child routers swallow actions with null. Tests added
2018-05-06 11:59:40 -07:00
Eric Vicenti
c2b396ee46 Fix CompletionAction trigger (#4115) 2018-05-06 11:57:51 -07:00
Serge Lebedev
bb1fd4cb8a Fix setting undefined value to isTransitioning (#4124) 2018-05-06 23:04:57 +06:00
Eric Vicenti
13fb87c217 Fix drawer stack reset-to-top behavior (#4132)
“reset” is not a NavigationAction anymore.

The correct fix, for v3, to this is to navigate to the first screen inside the stack. With the less-pushy navigate behavior in v2, this will result in the first route getting selected if you specify it by routeName.
2018-05-06 09:51:18 -07:00
Brent Vatne
3a054ae2c1 Release 2.0.0-rc.9 2018-05-04 11:16:34 -07:00
Brent Vatne
f04402e00d Pull createMaterialBottomTabNavigator into separate repo 2018-05-04 11:06:51 -07:00
Brent Vatne
4b26e88256 Release 2.0.0-rc.8 2018-05-04 10:14:34 -07:00
Eric Vicenti
e72702bf29 Fix event unsubscription logic (#4116)
Events were getting unsubscribed too early, so that the inner willBlur event was getting skipped when trying to “dismiss” a deep navigation stack.
2018-05-04 10:14:22 -07:00
Brent Vatne
2cd65c600a Update react-lifecycles-compat 2018-05-04 10:10:14 -07:00
Eric Vicenti
7d9a4675ed Fix drawer navigation dispatch (#4121) 2018-05-04 09:48:45 -07:00
Brent Vatne
57edded162 Add context around a test in switchrouter 2018-05-03 15:43:37 -07:00
Brent Vatne
b8a86b49eb Add router tests to clarify route resolution 2018-05-03 15:42:23 -07:00
Eric Vicenti
91ac23282b Fix issue with nested navigation actions in stack (#4114) 2018-05-03 10:13:43 -07:00
Vojtech Novak
f7843bfdae add a test so that #2856 can be closed (#4102)
* add test for 2856

* rename variables
2018-05-03 05:02:03 +02:00
simonbuerger
40b9cf5cf5 StateUtils: Use Array.prototype.findIndex instead of map => indexOf (#4106)
* Use Array.prototype.findIndex instead of map => indexOf

Creating a new array and iterating over all the routes is inefficient compared to findIndex, which does not create a new array and exits as soon as it finds a match. Since the indexOf method is used extensively this should provide a minor performance improvement

* reverted yarn.lock edits
2018-05-03 05:01:20 +02:00
Eric Vicenti
8be950a18b Fix initial action dispatch for nonPersisted apps (#4104) 2018-05-02 09:17:00 -07:00
Brent Vatne
bc166fb6a7 Release 2.0.0-rc.7 2018-04-30 17:08:11 -07:00
Eric Vicenti
088791d455 Add tests to confirm setParam behavior (#4099)
Adding these tests because reports from this issue make me nervous:

https://github.com/react-navigation/react-navigation/issues/1274
2018-04-30 16:37:41 -07:00
Brent Vatne
bd908bffeb Release 2.0.0-rc.6 2018-04-30 16:19:28 -07:00
Brent Vatne
e6bda58d57 Container state can be out of date if we have async functions between getting it and using it (#4098) 2018-04-30 15:59:49 -07:00
Rob Allsopp
8828f438ce go back to React$, and fix real error (#4095) 2018-04-30 13:04:48 -06:00
Rob Allsopp
ce21d7db38 Fix missing/incorrect flow types (#4085)
* don’t use private global

* add missing method ‘getParam’ to navigation screen prop

* correct return type for ‘withNavigation’

* add usage of `getParam` method
2018-04-27 15:30:23 -06:00
Jed Mao
660cf973bb Fix "npm test" on Windows 10 (#4066)
* Fix Windows

* update prettier

* Explain need for assetsTransformer in comment
2018-04-27 10:57:07 -05:00
Brent Vatne
33fa12ee89 Release 2.0.0-rc.5 2018-04-25 17:49:17 -07:00
Brent Vatne
55d41c3702 Give inactive routes in stack opportunity to handle action (#4064) 2018-04-26 00:48:55 +00:00
Brent Vatne
1657b8536e Release 2.0.0-rc.4 2018-04-25 17:03:56 -07:00
Brent Vatne
4537e5782c Bump react-navigation-deprecated-tab-navigator 2018-04-25 16:57:42 -07:00
Brent Vatne
c833b33354 Bump react-navigation-tabs 2018-04-25 16:49:57 -07:00
Rich Gilbank
1d92022802 Typo in deprecation notice (#4051) 2018-04-24 14:10:48 -04:00
Brent Vatne
0ad061c59e Release 2.0.0-rc.3 2018-04-20 17:40:02 +03:00
Adam Miskiewicz
d368ddac41 Make StackNavigator keyboard aware (#3951)
* Make StackNavigator keyboard aware

One thing that has always annoyed me in React Navigation is the handling of the keyboard. When a keyboard is visible on screen and a navigation action occurs (either by tapping a button or using a gesture), the keyboard tends to stay on screen until the transition completes. This feels janky and broken. On native iOS, for instance, the keyboard hides immediately when the navigation starts, and if the transition is cancelled (say, when the user releases the gesture), the keyboard reappears.

This PR introduces a "KeyboardAwareNavigator" higher order component that is enabled on the StackNavigator, unless a `disableKeyboardHandling` prop is passed into the StackNavigator's configuration.

* Set status bar in keyboard handling example

* Call gesture props in keyboard aware navigator if available

* Fix formatting
2018-04-20 07:03:25 -07:00
Serhii Palash
fc7ac254e9 Fix TabNavigator export ( Issue #3962 ) (#3979) 2018-04-20 16:40:18 +03:00
Brent Vatne
52d9e014bc Fix _isRouteFocused so it takes a route and returns bool rather than fn 2018-04-20 16:39:03 +03:00
Janic Duplessis
9d76dc6364 Fix header hardcoded height to accound for iPhone X and orientation changes (#4017) 2018-04-20 09:34:33 -04:00
Eric Vicenti
78684488fa Fix header ModularLeftComponent to goBack from child navigation (#4023) 2018-04-20 06:33:36 -07:00
Brent Vatne
a7b190a4f6 Release 2.0.0-rc.2 2018-04-09 17:26:32 -07:00