[v9.4.x] Search: Switch to list view when filtering by tags (#63017)

Search: Switch to list view when filtering by tags (#63004)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit c9773e55b2)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-02-07 07:12:56 -05:00
committed by GitHub
co-authored by Josh Hunt
parent bd14abb309
commit 88e8d97ad3
@@ -39,7 +39,7 @@ export function getValidQueryLayout(q: SearchState): SearchLayout {
// Folders is not valid when a query exists
if (layout === SearchLayout.Folders) {
if (q.query || q.sort || q.starred) {
if (q.query || q.sort || q.starred || q.tag.length > 0) {
return SearchLayout.List;
}
}