A04: Fix selected attributes for all period options

- Add selected={hours === '6/12/72'} to all period options (was only on 24)
- Ensures correct UI state when URL has hours=6/12/72
- CSS for filter-compact-hidden already correct (display:none!important)
- Filter fallback details working for no-JS mobile
- Pagination (R09) already handles offset preservation
This commit is contained in:
ik
2026-09-10 06:11:49 +07:00
parent 4974f362ac
commit 2ccca7350f
+1 -1
View File
@@ -63,7 +63,7 @@ const datasetJsonLd = {
<label>Водоём<select name="waterbody"><option value="">Все водоёмы</option>{waterbodies.map(x => <option value={x.slug} selected={waterbody === x.slug}>{x.name_ru}</option>)}</select></label>
<label>Рыба<select name="fish"><option value="">Любая рыба</option>{fishes.map(x => <option value={x.slug} selected={fish === x.slug}>{x.name_ru}</option>)}</select></label>
<details class="filter-advanced-fallback" open><summary>Период и порядок</summary><div class="advanced-fields">
<label class="filter-advanced-field">Период<select name="hours"><option value="6">6 часов</option><option value="12">12 часов</option><option value="24" selected={hours === "24"}>24 часа</option><option value="72">72 часа</option></select></label>
<label class="filter-advanced-field">Период<select name="hours"><option value="6" selected={hours === "6"}>6 часов</option><option value="12" selected={hours === "12"}>12 часов</option><option value="24" selected={hours === "24"}>24 часа</option><option value="72" selected={hours === "72"}>72 часа</option></select></label>
<label class="filter-advanced-field">Сначала<select name="sort"><option value="activity" selected={sort === "activity"}>Активные</option><option value="confidence" selected={sort === "confidence"}>Надёжные</option><option value="freshness" selected={sort === "freshness"}>Свежие</option></select></label>
</div></details>
<button>⌕ Найти клёв</button>