Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-parametr-in-onClose-function #55

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/react-pure-modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/example.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/react-pure-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ function PureModal(props: Props) {
}

if (onClose) {
onClose();
event
? onClose({
isTrusted: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Название лучше взять другое, фактически isPassive лучше всего. Так же нужно передавать каждый раз этот аргумент, потому что будет очень плохо когда в некоторых случаях его не будет.

})
: onClose();
}

unsetModalContext();
Expand Down