Skip to content

[Website] Persist the search terms in the URL anchor #3341

Open
@cpholguera

Description

@cpholguera

The URL anchor is updated only with checkbox filters. To persist the search term in the hash, append activeFilterState.searchTerm to the anchor array before updating history.

    if (activeFilterState.searchTerm) {
      anchor.push(`search=${encodeURIComponent(activeFilterState.searchTerm)}`);
    }
    history.replaceState(null, null, '#' + anchor.join(';'));   
    

Originally posted by @Copilot in #3340 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions