# 06-Apr-2026 — respect user's view toggle on mobile and clear expanded state on table switch [#224](https://github.com/nbarrett/ngx-ramblers/issues/224)

## [build 579](https://github.com/nbarrett/ngx-ramblers/actions/runs/24048805738) — [commit 00e8193](https://github.com/nbarrett/ngx-ramblers/commit/00e81932b12597e50be965ebbaa92249a2c4dbf4)

_____

### Fixes directly related to this Issue

* `resetQueryDrivenState()` was ignoring the user's localStorage preference and
always resetting to the group config default (CARDS). When queryParamMap
re-emitted (orientation change, soft reload, navigation events), the user's
explicit Table view selection was overridden. Now reads from localStorage first,
matching the pattern already used in the systemConfigService subscription.

* Also adds `role="button"` to dropdown `<a>` elements for reliable touch interaction
on mobile browsers (Samsung Internet, older WebViews) where `<a>` without `href`
may not fire click events.

* Clears expandedWalks when switching to table view so that a walk expanded in
cards view does not carry over its expanded state into the table layout.

### Additional fixes to improve advanced search queries during  criteria adjustment and preservation during screen refresh

* Fix replaceQueryParams in both events-full and walk-search to read the actual
current URL before merging, instead of relying on the stale Angular router
snapshot. The old approach used queryParamsHandling:"merge" which merged with
route.snapshot.queryParams — but location.replaceState never updated that
snapshot, so successive calls lost params set by earlier calls.

* Make queryParamMap subscription the primary search trigger on init, removing
the unreliable setTimeout fallback that could race with query param processing.
Advanced search changes now always fire performServerSideSearch directly from
onAdvancedSearch, and walk-search always writes advanced criteria to query
params (setting queryParamsActive=true on any change).

* When the server returns zero results for a page beyond range but pagination
total indicates matching documents exist, reset to page 1 and re-fetch rather
than displaying empty results with stale pagination.

### Advanced search UX improvements
* Add "X of Y selected" counts to all advanced search multiselect labels:
Walk Leaders, Groups, Day of the Week, Difficulty, Accessibility, Facilities.