mskocik / svelecte

Flexible autocomplete/select component written in Svelte,
https://svelecte.vercel.app
MIT License
472 stars 44 forks source link

Wrong message for empty results on remote datastore #210

Closed evgeny-sureev closed 9 months ago

evgeny-sureev commented 1 year ago

If remote datastore return empty results, we must display i18n.fetchEmpty instead of i18n.fetchBefore. I think there is a bug on line 220 of Svelecte.svelte, listMessage created as local variable instead of setting value of existing global var.

mskocik commented 1 year ago

You are right - i18n.fetchEmpty should be shown, BUT I am getting i18n.nomatch, not i18n.fetchBefore 🤔

image

What is your setup, that you get i18n.fetchBefore ?

evgeny-sureev commented 1 year ago
image

Here it is on Svelecte demo page https://mskocik.github.io/svelecte/, displayed text 'Type to start searching' is i18n.fetchBefore value.