Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add relevant results & retain search query from previous page #290

Merged

Conversation

Matthbo
Copy link
Member

@Matthbo Matthbo commented Jan 31, 2025

No description provided.

@Matthbo Matthbo requested a review from philipsens January 31, 2025 14:42
@Matthbo Matthbo linked an issue Jan 31, 2025 that may be closed by this pull request
@Matthbo Matthbo self-assigned this Jan 31, 2025
const firstElementNamePart = this.element?.name.split(/(?=[A-Z])/)[0];
this.searchQuery = firstElementNamePart ?? '';
if (this.element) {
const firstElementNamePart = this.element.name.split(/(?=[A-Z])/)[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also split on numbers? We have a lot of pipes with a '2' in them.
Might be nice to create a variable (or method) for this regex for readability.

@philipsens
Copy link
Member

When going back to home, shouldn't the filters also stay?

@Matthbo
Copy link
Member Author

Matthbo commented Feb 4, 2025

This issue was specifically for retaining state while navigating through browser history, I could keep the searchquery and filters saved in the service and reuse them if they are available.
But I can also see how that may be annoying and you'd like a full reset of the search/filters (after having the browser tab open for a while for example)

@philipsens philipsens merged commit 9c6c5d9 into master Feb 4, 2025
2 checks passed
@philipsens philipsens deleted the issue/253-strange-behavior-to-the-left-menu-after-searching branch February 4, 2025 18:17
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.

Strange behavior to the left menu after searching
2 participants