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

Search: Preserves search filters when navigating to another page #67021

Merged
merged 3 commits into from
Apr 27, 2023

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Apr 21, 2023

Which issue(s) does this PR fix?:

This PR fixes #65710

Who is this feature for?

Navigating to dashboard from search should not clear the filters

 Navigating to dashboard from search should not clear the filters
@khushijain21 khushijain21 requested a review from a team as a code owner April 21, 2023 06:35
@khushijain21 khushijain21 requested review from joshhunt and JoaoSilvaGrafana and removed request for a team April 21, 2023 06:35
@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels Apr 21, 2023
Comment on lines 254 to 257
// Clear some filters only if we're not opening a search item in a new tab
if (!e.altKey && !e.ctrlKey && !e.metaKey) {
this.setState({ tag: [], starred: false, sort: undefined, query: '', folderUid: undefined });
}
// if (!e.altKey && !e.ctrlKey && !e.metaKey) {
// this.setState({ tag: [], starred: false, sort: undefined, query: '', folderUid: undefined });
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Should just remove all these comments, otherwise it works as expected 👍

@joshhunt joshhunt modified the milestone: 10.0.x Apr 26, 2023
@joshhunt joshhunt changed the title Search: Navigating to a dashboard Search: Preserves search filters when navigating to another page Apr 26, 2023
@joshhunt joshhunt added this to the 10.0.x milestone Apr 26, 2023
@JoaoSilvaGrafana JoaoSilvaGrafana added the no-backport Skip backport of PR label Apr 26, 2023
@JoaoSilvaGrafana JoaoSilvaGrafana modified the milestone: 10.0.x Apr 26, 2023
@JoaoSilvaGrafana
Copy link
Contributor

@khushijain21 could you merge grafana:main back to your branch? This might solve the issue with failing tests

Copy link
Contributor

@JoaoSilvaGrafana JoaoSilvaGrafana left a comment

Choose a reason for hiding this comment

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

Nice 👏

@JoaoSilvaGrafana JoaoSilvaGrafana merged commit 2306fb3 into grafana:main Apr 27, 2023
@zerok zerok modified the milestones: 10.0.x, 10.0.0 May 2, 2023
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend no-backport Skip backport of PR pr/external This PR is from external contributor
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Search: Navigating to a dashboard from search should not clear the filters
5 participants