fix(react): duplicate events being fired in ionic/react (#17321)

This commit is contained in:
Josh Thomas
2019-01-30 12:55:38 -06:00
committed by GitHub
parent c87867caef
commit a4150010a8
9 changed files with 62 additions and 33 deletions

View File

@ -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 * from './types';
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);
Ionic.config = config;
defineCustomElements(window);
}
export * from './register';