-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): duplicate events being fired in ionic/react (#17321)
- Loading branch information
1 parent
aa6f776
commit ca8b540
Showing
9 changed files
with
62 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,5 @@ | ||
import { addIcons } from 'ionicons'; | ||
import { ICON_PATHS } from 'ionicons/icons'; | ||
import { IonicConfig } from '@ionic/core'; | ||
import { defineCustomElements } from '@ionic/core/loader'; | ||
|
||
export * from './components'; | ||
|
||
export interface IonicGlobal { | ||
config?: any; | ||
ael?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void; | ||
raf?: (ts: number) => void; | ||
rel?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void; | ||
} | ||
|
||
export interface IonicWindow extends Window { | ||
Ionic: IonicGlobal; | ||
} | ||
|
||
export function registerIonic(config: IonicConfig = {}) { | ||
const win: IonicWindow = window as any; | ||
const Ionic = (win.Ionic = win.Ionic || {}); | ||
addIcons(ICON_PATHS); | ||
export * from './types'; | ||
|
||
Ionic.config = config; | ||
defineCustomElements(window); | ||
} | ||
export * from './register'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { addIcons } from 'ionicons'; | ||
import { ICON_PATHS } from 'ionicons/icons'; | ||
import { IonicConfig } from '@ionic/core'; | ||
import { defineCustomElements } from '@ionic/core/loader'; | ||
import { IonicWindow } from './types'; | ||
|
||
export function registerIonic(config: IonicConfig = {}) { | ||
const win: IonicWindow = window as any; | ||
const Ionic = (win.Ionic = win.Ionic || {}); | ||
addIcons(ICON_PATHS); | ||
|
||
Ionic.config = config; | ||
defineCustomElements(window); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters