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: fixed issue of unable to call handle submit function on button c… #656

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

sundasnoreen12
Copy link
Contributor

@sundasnoreen12 sundasnoreen12 commented Oct 25, 2023

INF-1139

Description

After updating React and ReactDOM from version 16 to version 17 in the context of this Pull Request, we encountered an issue with the saving mechanism. The problem arose because the "Save" button in the footer was located outside the form element. In React version 17, when a user clicks the "Save" button, it no longer triggers the onSubmit event handler of the form, unlike in React version 16.

To resolve this issue, we added the "bubbles: true" option when dispatching the event for the form. This change ensures that the event bubbles up through the DOM, making it possible to trigger the onSubmit event handler of the form even when the "Save" button is located outside the form element.

Also Fixed UI glitch because of custom css added for Paragon class in PR.

Screenshots
Before

Screenshot 2023-10-25 at 9 04 51 PM

After

Screenshot 2023-10-25 at 9 05 40 PM

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d497b01) 86.73% compared to head (6758158) 86.85%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
+ Coverage   86.73%   86.85%   +0.12%     
==========================================
  Files         388      388              
  Lines        5783     5783              
  Branches     1267     1267              
==========================================
+ Hits         5016     5023       +7     
+ Misses        742      735       -7     
  Partials       25       25              
Files Coverage Δ
...ssions/app-config-form/AppConfigFormSaveButton.jsx 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@awais-ansari awais-ansari merged commit a697119 into master Oct 25, 2023
6 checks passed
@awais-ansari awais-ansari deleted the sundas/INF-1139 branch October 25, 2023 17:58
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.

4 participants