From cc016e4c76404f30c94b5e283f1d3ef065cc2b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sko=C4=8D=C3=ADk?= Date: Mon, 11 Sep 2023 10:30:35 +0200 Subject: [PATCH] Revert "feat: Add prop fetchDebounceTime for fetch request" --- README.md | 1 - src/lib/Svelecte.svelte | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index f5675f7..48667a7 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,6 @@ fetch | string\|function | `null` | Check "remote datasource" se fetchMode | string | `auto` | When set to `init` options are fetched only when mounted, when searching it search in downloaded dataset fetchCallback | function | `null` | optional fetch callback fetchResetOnBlur | bool | `true` | reset previous search results on empty input, related to `resetOnBlur` -fetchDebounceTime | number | `500` | Change default debounce time for fetch request minQuery | number | `1` | Minimal amount of characters required to perform remote request. Usable with `fetch` property lazyDropdown | bool | `true` | render dropdown after first focus, not by default virtualList | bool | `false` | Whether use virtual list for dropdown items (useful for large datasets) diff --git a/src/lib/Svelecte.svelte b/src/lib/Svelecte.svelte index 2284e5d..e4288d4 100644 --- a/src/lib/Svelecte.svelte +++ b/src/lib/Svelecte.svelte @@ -75,7 +75,6 @@ export let fetchMode = 'auto'; export let fetchCallback = defaults.fetchCallback; export let fetchResetOnBlur = true; - export let fetchDebounceTime = 500; export let minQuery = defaults.minQuery; // performance export let lazyDropdown = defaults.lazyDropdown; @@ -235,7 +234,7 @@ dispatch('fetch', options) }); }) - }, fetchDebounceTime); + }, 500); if (initFetchOnly) { if (typeof fetch === 'string' && fetch.indexOf('[parent]') !== -1 && !parentValue) return null;