Skip to content

Refresh locality/species data and return to origin tab after occurrence edit - #1269

Merged
karilint merged 2 commits into
mainfrom
fix/occurrence-edit-invalidate-locality-cache
Oct 30, 2026
Merged

karilint merged 2 commits into
mainfrom
fix/occurrence-edit-invalidate-locality-cache

Conversation

@karilint

@karilint karilint commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

After editing an occurrence from a Locality or Species Occurrences tab:

  • editOccurrence now also invalidates the locality and species cache tags, so the Occurrences tab shows the edit without a browser refresh (previously only the occurrence tag was invalidated).
  • OccurrenceDetails now navigates back to the returnTo URL (e.g. /locality/<lid>?tab=2, /species/<id>?tab=7) after a successful save. Without returnTo it stays on the occurrence page as before.

Notes: lint and tsc pass. Four existing Jest tests in OccurrenceCoreTab/OccurrenceWearTab fail on main too (unrelated).

karilint and others added 2 commits October 29, 2026 19:30
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@karilint karilint changed the title Invalidate locality cache when an occurrence is edited Refresh locality/species data and return to origin tab after occurrence edit Oct 30, 2026
@karilint
karilint merged commit a65423b into main Oct 30, 2026
4 checks passed
@karilint
karilint deleted the fix/occurrence-edit-invalidate-locality-cache branch October 30, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant