fix(react): IonTabButton will call custom onClick handlers (#25313)

Resolves #22511
This commit is contained in:
Sean Perkins
2022-05-19 12:19:34 -04:00
committed by GitHub
parent 51f3179bcc
commit 6034418b33
7 changed files with 64 additions and 4 deletions

View File

@ -34,6 +34,11 @@ export const IonTabButton = /*@__PURE__*/ (() =>
}
render() {
/**
* onClick is excluded from the props, since it has a custom
* implementation within IonTabBar.tsx. Calling onClick within this
* component would result in duplicate handler calls.
*/
const { onClick, ...rest } = this.props;
return (
<IonTabButtonInner