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

fix(core/modal): fixes runtime error #902

Merged
merged 16 commits into from
Jan 16, 2024
Merged

fix(core/modal): fixes runtime error #902

merged 16 commits into from
Jan 16, 2024

Conversation

matthiashader
Copy link
Collaborator

@matthiashader matthiashader commented Nov 7, 2023

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (yarn build) was run locally and any changes were pushed
  • Unit tests (yarn test) were run locally and passed
  • Visual Regression Tests (yarn visual-regression) were run locally and passed
  • Linting (npm lint) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bug fix
  • Feature
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

  • In the preview example a runtime error occurs on react

GitHub Issue Number: #900

What is the new behavior?

  • no runtime error on the preview example

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

@matthiashader matthiashader linked an issue Nov 7, 2023 that may be closed by this pull request
@EnesKilicaslan
Copy link

Hi @matthiashader , thanks for the implementation.
However, I wonder how this will resolve the problem. The issue appears even I close the modal with cancel button.

@matthiashader
Copy link
Collaborator Author

matthiashader commented Nov 7, 2023

Hi @matthiashader , thanks for the implementation. However, I wonder how this will resolve the problem. The issue appears even I close the modal with cancel button.

@EnesKilicaslan
Even if you remove the onCloseClick in the IxModalHeader? Like:


Message headline

The error from my perspective was related to the fact that the modal-header and the also the event handling took care of closing the modal, so one of these didnt find it the before closed modal.

@EnesKilicaslan
Copy link

EnesKilicaslan commented Nov 8, 2023

I see
At first, I thought it can not be related with header because I never close the modal from the header, instead I use cancel button.
However, it might not be like that.
All, I can say is it does not completely fix it.

@danielleroux
Copy link
Collaborator

I see At first, I thought it can not be related with header because I never close the modal from the header, instead I use cancel button. However, it might not be like that. All, I can say is it does not completely fix it.

What do you exactly mean?

Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

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

JSDocs changes

@EnesKilicaslan
Copy link

I see At first, I thought it can not be related with header because I never close the modal from the header, instead I use cancel button. However, it might not be like that. All, I can say is it does not completely fix it.

What do you exactly mean?

I mean, just removing onCloseClick from ModalHeader does not solve the problem

@matthiashader
Copy link
Collaborator Author

matthiashader commented Nov 14, 2023

I see At first, I thought it can not be related with header because I never close the modal from the header, instead I use cancel button. However, it might not be like that. All, I can say is it does not completely fix it.

What do you exactly mean?

I mean, just removing onCloseClick from ModalHeader does not solve the problem

Could you then provide us with a snippet where the error still remains? Because i can't produce any runtime error without the onCloseClick

@matthiashader matthiashader marked this pull request as draft November 15, 2023 10:07
@matthiashader matthiashader marked this pull request as ready for review November 20, 2023 09:04
Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

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

Minor change

@matthiashader matthiashader self-assigned this Nov 22, 2023
danielleroux
danielleroux previously approved these changes Dec 14, 2023
@danielleroux danielleroux added this to the 2.1.0 milestone Dec 21, 2023
@jul-lam jul-lam self-assigned this Jan 9, 2024
danielleroux
danielleroux previously approved these changes Jan 10, 2024
@danielleroux danielleroux merged commit f628f5f into main Jan 16, 2024
6 checks passed
@danielleroux danielleroux deleted the fix/modal branch January 16, 2024 06:15
@danielleroux danielleroux added the pull request affects patch version The pull request affects only patch version label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request affects patch version The pull request affects only patch version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subsequent actions on modal results Runtime Error
5 participants