We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a43106d commit 5c1c166Copy full SHA for 5c1c166
packages/site/src/routes/demo/autocomplete/_Async.svelte
@@ -46,9 +46,10 @@
46
// Pretend to be loading something...
47
await new Promise((resolve) => setTimeout(resolve, 1000));
48
49
+ // This means the function was called again, so we should cancel.
50
if (myCounter !== counter) {
- // This means the function was called again, so we should cancel.
51
- // This is how you tell Autocomplete to cancel this search. It won't
+ // `return false` (or, more accurately, resolving the Promise object to
52
+ // `false`) is how you tell Autocomplete to cancel this search. It won't
53
// replace the results of any subsequent search that has already finished.
54
return false;
55
}
0 commit comments