Skip to content

Commit

Permalink
Adding preventDefault to doc example to better showcase loading state…
Browse files Browse the repository at this point in the history
… for form
  • Loading branch information
skduncan committed Oct 14, 2024
1 parent d4de620 commit 2298eaa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
const loadingForm = document.querySelector(".pb_form_loading")
if (loadingForm) {
loadingForm.addEventListener("submit", function(event) {
event.preventDefault();

const submitButton = event['submitter'];
const cancelButton = event['target'].querySelector('button[type="reset"]');

Expand Down

0 comments on commit 2298eaa

Please sign in to comment.