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

Allow validation before close Sub Page #479

Merged

Conversation

InnaBoitsun
Copy link
Contributor

@InnaBoitsun InnaBoitsun commented Nov 22, 2022

@coveralls
Copy link

coveralls commented Nov 22, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling d3397d6 on feature/55244-allow-validation-before-close-sub-page into a25c252 on develop.

@@ -80,7 +80,8 @@ export const SubPage = ({ config, match, location, history, root, modulePrependP
disableElevation={action.isPrimary}
disabled={action.disabled}
onClick={e => {
action.handler && action.handler(e);
let actionHandlerResult = action.handler && action.handler(e);
if (action.validateBeforeClose && !actionHandlerResult) return;
Copy link
Member

Choose a reason for hiding this comment

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

Should actionHandlerResult be false when action.handler is null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed the condition

neexite
neexite previously approved these changes Nov 22, 2022
@InnaBoitsun InnaBoitsun merged commit 467bd29 into develop Nov 22, 2022
@InnaBoitsun InnaBoitsun deleted the feature/55244-allow-validation-before-close-sub-page branch November 22, 2022 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants