File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/components/v2/appDetails/k8Resource Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,16 @@ export const K8ResourceComponent = ({
104
104
}
105
105
106
106
const handleFilterClick = ( selectedFilter : string ) => {
107
- const searchParams = new URLSearchParams ( [ [ 'filterType' , selectedFilter ] ] )
107
+ const searchParams = new URLSearchParams ( location . search )
108
+ searchParams . set ( 'filterType' , selectedFilter )
109
+
108
110
IndexStore . updateFilterType ( selectedFilter . toUpperCase ( ) )
109
111
if ( selectedFilter === ALL_RESOURCE_KIND_FILTER ) {
110
- history . push ( { search : '' } )
112
+ searchParams . delete ( 'filterType' )
113
+ history . push ( { search : `${ searchParams } ` } )
111
114
return
112
115
}
116
+
113
117
// current selected node exist in new selected filter or not
114
118
const nextFilterNodes = nodes . filter ( ( node ) => doesNodeSatisfiesFilter ( node , selectedFilter ) )
115
119
const selectedNodeExists = nextFilterNodes . some ( ( node ) => node . kind . toLowerCase ( ) === currentNode )
You can’t perform that action at this time.
0 commit comments