I have an API route that is definitely returning data (specifically, an array of strings), but Svelecte just displays, "No data related to your search".
I added a fetchCallback prop to log the data returned from the server:
<Svelecte fetch="/api/autocomplete?q=[query]" minQuery={3}
fetchCallback={(data: any) => {
console.log(data);
return data;
}}
bind:value={$formData.value}
/>
I can see the data in the browser's JS console, which, for now, is just an array of strings: ["Alpha", "Beta", "Gamma"]
I imagine that I'm doing something wrong, but can't figure out what it is. Any suggestions on how to debug this would be greatly appreciated.