diff options
Diffstat (limited to 'web/templates/index.html')
| -rw-r--r-- | web/templates/index.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/templates/index.html b/web/templates/index.html index 32c0857..050f0bf 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -144,7 +144,7 @@ id="shopping-list-select" class="w-full bg-black/40 border border-white/20 rounded-lg px-3 py-2 text-sm text-white mb-3" required> - <option value="">Select store...</option> + <option value="">Loading stores...</option> </select> <button type="submit" class="w-full bg-green-900/50 hover:bg-green-900/70 text-green-300 px-4 py-2 rounded-lg text-sm font-medium"> @@ -224,7 +224,10 @@ fetch('/partials/shopping-lists') .then(function(r) { return r.text(); }) .then(function(html) { - select.innerHTML = '<option value="">Select store...</option>' + html; + select.innerHTML = html; + if (select.options.length > 0) { + select.selectedIndex = 0; + } }) .catch(function(e) { console.error('Failed to load shopping lists:', e); }); } |
