framework7-react 7.0.0-beta.11 → 7.0.0-beta.16

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.
@@ -25,7 +25,7 @@ interface ActionsProps {
25
25
  onActionsClose ?: (instance?: Actions.Actions) => void;
26
26
  onActionsClosed ?: (instance?: Actions.Actions) => void;
27
27
  containerEl ?: string | object;
28
- ref?: React.MutableRefObject<{el: HTMLElement | null; f7Actions: () => Actions}>;
28
+ ref?: React.MutableRefObject<{el: HTMLElement | null; f7Actions: () => Actions.Actions}>;
29
29
  color?: string;
30
30
  colorTheme?: string;
31
31
  textColor?: string;
@@ -38,7 +38,7 @@ interface RangeProps {
38
38
  themeDark?: boolean;
39
39
  onRangeChange ?: (val?: any) => void;
40
40
  onRangeChanged ?: (val?: any) => void;
41
- ref?: React.MutableRefObject<{el: HTMLElement | null; f7Range: () => Range.Rage}>;
41
+ ref?: React.MutableRefObject<{el: HTMLElement | null; f7Range: () => Range.Range}>;
42
42
  }
43
43
  declare const Range: React.FunctionComponent<RangeProps>;
44
44
 
@@ -9,6 +9,7 @@ interface ViewProps {
9
9
  id?: string | number;
10
10
  className?: string;
11
11
  style?: React.CSSProperties;
12
+ initRouterOnTabShow?: boolean;
12
13
  tab ?: boolean;
13
14
  tabActive ?: boolean;
14
15
  name ?: string;
@@ -23,11 +23,13 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
23
23
  tab,
24
24
  tabActive,
25
25
  url,
26
+ initRouterOnTabShow,
26
27
  browserHistoryInitialMatch = true
27
28
  } = props;
28
29
  const childrenArray = React.Children.toArray(children);
29
30
  const initialPageComponent = childrenArray.filter(c => c.props && c.props.initialPage)[0];
30
31
  const restChildren = childrenArray.filter(c => !c.props || !c.props.initialPage);
32
+ const shouldInitRouter = !(initRouterOnTabShow && tab && !tabActive);
31
33
  const extraAttrs = getExtraAttrs(props);
32
34
  const f7View = useRef(null);
33
35
  const elRef = useRef(null);
@@ -61,7 +63,7 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
61
63
  };
62
64
  f7routers.views.push(routerData.current);
63
65
 
64
- if (f7View.current && f7View.current.router && (url || main)) {
66
+ if (shouldInitRouter && f7View.current && f7View.current.router && (url || main)) {
65
67
  const initialData = getRouterInitialComponent(f7View.current.router, initialPageComponent);
66
68
  initialPage = initialData.initialPage;
67
69
  initialRoute = initialData.initialRoute;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 React 7.0.0-beta.11
2
+ * Framework7 React 7.0.0-beta.16
3
3
  * Build full featured iOS & Android apps using Framework7 & React
4
4
  * https://framework7.io/react/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: February 17, 2022
10
+ * Released on: April 12, 2022
11
11
  */
12
12
  import Framework7React from './shared/plugin.js';
13
13
  import { f7, f7ready, theme } from './shared/f7.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework7-react",
3
- "version": "7.0.0-beta.11",
3
+ "version": "7.0.0-beta.16",
4
4
  "description": "Build full featured iOS & Android apps using Framework7 & React",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,6 +25,7 @@
25
25
  "ipad",
26
26
  "apple",
27
27
  "phonegap",
28
+ "capacitor",
28
29
  "native",
29
30
  "touch",
30
31
  "appstore",