Skip to content

Commit 8008229

Browse files
committed
set loading state before running http request
1 parent aedf260 commit 8008229

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h2 tabindex="-1" id="success3" class="success" hidden>Your submission was succe
108108
}
109109
</script>
110110

111-
<script type="module" src="https://unpkg.com/@github/auto-check-element@latest"></script>
112-
<!-- <script type="module" src="../dist/bundle.js" defer></script> -->
111+
<!-- <script type="module" src="https://unpkg.com/@github/auto-check-element@latest"></script> -->
112+
<script type="module" src="../dist/bundle.js" defer></script>
113113
</body>
114114
</html>

src/auto-check-element.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ function handleChange(checker: () => void, event: Event) {
221221
(event.type === 'blur' && autoCheckElement.onlyValidateOnBlur) || // Only validate on blur if only-validate-on-blur is set
222222
(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)
223223
) {
224-
checker()
225224
setLoadingState(event)
225+
checker()
226226
}
227227
}
228228

0 commit comments

Comments
 (0)