Skip to content

Commit

Permalink
* pick: call callback with this.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Mar 22, 2024
1 parent 345b742 commit d823994
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/pick/src/components/pick.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ export class Pick<S extends PickState = PickState, O extends PickOptions<S> = Pi
protected _handlePopToggle(opened: boolean) {
const {onPopShown, onPopHidden} = this.props;
if (opened && onPopShown) {
onPopShown();
onPopShown.call(this);
} else if (!opened && onPopHidden) {
onPopHidden();
onPopHidden.call(this);
}
}

Expand All @@ -222,9 +222,9 @@ export class Pick<S extends PickState = PickState, O extends PickOptions<S> = Pi
}
const {onPopShow, onPopHide} = this.props;
if (nextOpened && onPopShow) {
onPopShow();
onPopShow.call(this);
} else if (!nextOpened && onPopHide) {
onPopHide();
onPopHide.call(this);
}
}

Expand Down

0 comments on commit d823994

Please sign in to comment.