mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
merge release-6.3.8
Release 6.3.8
This commit is contained in:
@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [6.3.8](https://github.com/ionic-team/ionic/compare/v6.3.7...v6.3.8) (2022-11-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **popover:** popover positions correctly on all frameworks ([#26306](https://github.com/ionic-team/ionic/issues/26306)) ([be9a399](https://github.com/ionic-team/ionic/commit/be9a399eeed37ae4a67add78ac1283ba0c5e4b14)), closes [#25337](https://github.com/ionic-team/ionic/issues/25337)
|
||||
* **react:** useIonRouter hook has stable router reference ([#25000](https://github.com/ionic-team/ionic/issues/25000)) ([89e3cd6](https://github.com/ionic-team/ionic/commit/89e3cd67ce6d9cfc0607d6a89362483878a1820b)), closes [#24987](https://github.com/ionic-team/ionic/issues/24987)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.3.7](https://github.com/ionic-team/ionic/compare/v6.3.6...v6.3.7) (2022-11-16)
|
||||
|
||||
**Note:** Version bump only for package @ionic/react
|
||||
|
18
packages/react/package-lock.json
generated
18
packages/react/package-lock.json
generated
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@ionic/react",
|
||||
"version": "6.3.7",
|
||||
"version": "6.3.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/react",
|
||||
"version": "6.3.7",
|
||||
"version": "6.3.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.3.7",
|
||||
"@ionic/core": "^6.3.8",
|
||||
"ionicons": "^6.0.2",
|
||||
"tslib": "*"
|
||||
},
|
||||
@ -607,9 +607,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ionic/core": {
|
||||
"version": "6.3.7",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.7.tgz",
|
||||
"integrity": "sha512-HWntdPsc4lVHHwz7kY2BSQteafwXsPxc8y5wAdfeA8woRLGse+1Vq00CDUihf7tTUflM1CdmVgGtyYlDAnO2fA==",
|
||||
"version": "6.3.8",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.8.tgz",
|
||||
"integrity": "sha512-mpawxkbjx/lBaWMYexvEHzKP9+03gKKe/CXHGnBh7z9WHpDuR+H9jdojjiHkakoN79TcdM3G+BYMZ0tVGeeJhw==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
@ -9522,9 +9522,9 @@
|
||||
}
|
||||
},
|
||||
"@ionic/core": {
|
||||
"version": "6.3.7",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.7.tgz",
|
||||
"integrity": "sha512-HWntdPsc4lVHHwz7kY2BSQteafwXsPxc8y5wAdfeA8woRLGse+1Vq00CDUihf7tTUflM1CdmVgGtyYlDAnO2fA==",
|
||||
"version": "6.3.8",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.8.tgz",
|
||||
"integrity": "sha512-mpawxkbjx/lBaWMYexvEHzKP9+03gKKe/CXHGnBh7z9WHpDuR+H9jdojjiHkakoN79TcdM3G+BYMZ0tVGeeJhw==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/react",
|
||||
"version": "6.3.7",
|
||||
"version": "6.3.8",
|
||||
"description": "React specific wrapper for @ionic/core",
|
||||
"keywords": [
|
||||
"ionic",
|
||||
@ -40,7 +40,7 @@
|
||||
"css/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.3.7",
|
||||
"@ionic/core": "^6.3.8",
|
||||
"ionicons": "^6.0.2",
|
||||
"tslib": "*"
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AnimationBuilder } from '@ionic/core/components';
|
||||
import React, { useContext } from 'react';
|
||||
import React, { useContext, useMemo } from 'react';
|
||||
|
||||
import { RouteAction, RouterDirection, RouterOptions } from '../models';
|
||||
import { RouteInfo } from '../models/RouteInfo';
|
||||
@ -39,13 +39,17 @@ export const IonRouterContext = React.createContext<IonRouterContextState>({
|
||||
*/
|
||||
export function useIonRouter(): UseIonRouterResult {
|
||||
const context = useContext(IonRouterContext);
|
||||
return {
|
||||
back: context.back,
|
||||
push: context.push,
|
||||
goBack: context.back,
|
||||
canGoBack: context.canGoBack,
|
||||
routeInfo: context.routeInfo,
|
||||
};
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
back: context.back,
|
||||
push: context.push,
|
||||
goBack: context.back,
|
||||
canGoBack: context.canGoBack,
|
||||
routeInfo: context.routeInfo,
|
||||
}),
|
||||
[context.back, context.push, context.canGoBack, context.routeInfo]
|
||||
);
|
||||
}
|
||||
|
||||
export type UseIonRouterResult = {
|
||||
|
@ -55,6 +55,17 @@ export const createInlineOverlayComponent = <PropType, ElementType>(
|
||||
componentDidMount() {
|
||||
this.componentDidUpdate(this.props);
|
||||
|
||||
/**
|
||||
* Mount the inner component when the
|
||||
* overlay is about to open.
|
||||
*
|
||||
* For ion-popover, this is when `ionMount` is emitted.
|
||||
* For other overlays, this is when `willPresent` is emitted.
|
||||
*/
|
||||
this.ref.current?.addEventListener('ionMount', () => {
|
||||
this.setState({ isOpen: true });
|
||||
});
|
||||
|
||||
/**
|
||||
* Mount the inner component
|
||||
* when overlay is about to open.
|
||||
|
@ -83,4 +83,4 @@ const PopoverComponent: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default PopoverComponent;
|
||||
export default PopoverComponent;
|
Reference in New Issue
Block a user