Skip to content

Commit f00c994

Browse files
dgrahammuan
andcommitted
Toggle loading attribute once
Co-authored-by: Mu-An Chiou <[email protected]>
1 parent 0e04041 commit f00c994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery:
9393
state.controller.abort()
9494
} else {
9595
remoteInput.dispatchEvent(new CustomEvent('loadstart'))
96+
remoteInput.setAttribute('loading', '')
9697
}
9798

9899
state.controller = makeAbortController()
99100

100-
remoteInput.setAttribute('loading', '')
101101
let response
102102
let html = ''
103103
try {

0 commit comments

Comments
 (0)