Skip to content

Commit

Permalink
Merge pull request #193 from mskocik/revert-192-master
Browse files Browse the repository at this point in the history
Revert "feat: Add prop fetchDebounceTime for fetch request"
  • Loading branch information
mskocik authored Sep 11, 2023
2 parents 9b9ae3b + cc016e4 commit afcdc3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/lib/Svelecte.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -235,7 +234,7 @@
dispatch('fetch', options)
});
})
}, fetchDebounceTime);
}, 500);
if (initFetchOnly) {
if (typeof fetch === 'string' && fetch.indexOf('[parent]') !== -1 && !parentValue) return null;
Expand Down

0 comments on commit afcdc3d

Please sign in to comment.