Skip to content

Commit

Permalink
set loading state before running http request
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Nov 26, 2024
1 parent aedf260 commit 8008229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2 tabindex="-1" id="success3" class="success" hidden>Your submission was succe
}
</script>

<script type="module" src="https://unpkg.com/@github/auto-check-element@latest"></script>
<!-- <script type="module" src="../dist/bundle.js" defer></script> -->
<!-- <script type="module" src="https://unpkg.com/@github/auto-check-element@latest"></script> -->
<script type="module" src="../dist/bundle.js" defer></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/auto-check-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ function handleChange(checker: () => void, event: Event) {
(event.type === 'blur' && autoCheckElement.onlyValidateOnBlur) || // Only validate on blur if only-validate-on-blur is set
(autoCheckElement.onlyValidateOnBlur && autoCheckElement.validateOnKeystroke) // Only validate on key inputs in only-validate-on-blur mode if validate-on-keystroke is set (when input is invalid)
) {
checker()
setLoadingState(event)
checker()
}
}

Expand Down

0 comments on commit 8008229

Please sign in to comment.