react-native-navigation 7.33.2 → 7.33.3-snapshot.991

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest.config.js CHANGED
@@ -8,6 +8,7 @@ module.exports = {
8
8
  },
9
9
  roots: [
10
10
  '<rootDir>/lib/src/',
11
+ '<rootDir>/lib/Mock/',
11
12
  '<rootDir>/playground/src/',
12
13
  '<rootDir>/integration/',
13
14
  '<rootDir>/scripts/',
@@ -23,8 +24,8 @@ module.exports = {
23
24
  '<rootDir>/playground/img/layouts@2x.png',
24
25
  },
25
26
  collectCoverageFrom: [
26
- 'lib/src/**/*.ts',
27
- 'lib/src/**/*.tsx',
27
+ 'lib/src/**/*.(ts|tsx)',
28
+ 'lib/Mock/**/*.(ts|tsx)',
28
29
  'integration/**/*.js',
29
30
  '!lib/dist/index.js',
30
31
  '!lib/dist/Navigation.js',
@@ -4,9 +4,10 @@ import { switchTabByIndex } from '../actions/layoutActions';
4
4
  import ParentNode from './ParentNode';
5
5
 
6
6
  export default class BottomTabsNode extends ParentNode {
7
- selectedIndex: number = 0;
7
+ selectedIndex: number;
8
8
  constructor(layout: any, parentNode?: ParentNode) {
9
9
  super(layout, 'BottomTabs', parentNode);
10
+ this.selectedIndex = layout.data?.options?.bottomTabs?.currentTabIndex || 0;
10
11
  }
11
12
 
12
13
  mergeOptions(options: Options) {
@@ -5,9 +5,10 @@ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
5
5
  const layoutActions_1 = require("../actions/layoutActions");
6
6
  const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
7
7
  class BottomTabsNode extends ParentNode_1.default {
8
- selectedIndex = 0;
8
+ selectedIndex;
9
9
  constructor(layout, parentNode) {
10
10
  super(layout, 'BottomTabs', parentNode);
11
+ this.selectedIndex = layout.data?.options?.bottomTabs?.currentTabIndex || 0;
11
12
  }
12
13
  mergeOptions(options) {
13
14
  super.mergeOptions(options);
@@ -58,11 +58,11 @@
58
58
  - (void)viewWillAppear:(BOOL)animated {
59
59
  [super viewWillAppear:animated];
60
60
  // This hack is needed for cases when the initialized state of the tabBar should be hidden
61
- UINavigationController *firstChild = [self.childViewControllers objectAtIndex:0];
62
- if ([firstChild isKindOfClass:UINavigationController.class] &&
63
- firstChild.hidesBottomBarWhenPushed) {
64
- [firstChild pushViewController:UIViewController.new animated:NO];
65
- [firstChild popViewControllerAnimated:NO];
61
+ UINavigationController *selectedChild = self.selectedViewController;
62
+ if ([selectedChild isKindOfClass:UINavigationController.class] &&
63
+ selectedChild.hidesBottomBarWhenPushed) {
64
+ [selectedChild pushViewController:UIViewController.new animated:NO];
65
+ [selectedChild popViewControllerAnimated:NO];
66
66
  }
67
67
  }
68
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.33.2",
3
+ "version": "7.33.3-snapshot.991",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,