File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/components/ClusterNodes Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const ClusterSelectionBody: React.FC<ClusterSelectionBodyTypes> = ({
57
57
const parentRef = useRef < HTMLDivElement > ( null )
58
58
59
59
const [ lastSyncTime , setLastSyncTime ] = useState < Dayjs > ( dayjs ( ) )
60
- const [ showKubeConfigModal , setKubeConfigModal ] = useState ( false )
60
+ const [ showKubeConfigModal , setShowKubeConfigModal ] = useState ( false )
61
61
const [ selectedClusterName , setSelectedClusterName ] = useState ( '' )
62
62
63
63
const { clearFilters } = useUrlFilters < ClusterMapListSortableKeys , { clusterFilter : ClusterFiltersType } > ( {
@@ -94,11 +94,12 @@ const ClusterSelectionBody: React.FC<ClusterSelectionBodyTypes> = ({
94
94
}
95
95
96
96
const onChangeShowKubeConfigModal = ( ) => {
97
- setKubeConfigModal ( true )
97
+ setShowKubeConfigModal ( true )
98
98
}
99
99
100
100
const onChangeCloseKubeConfigModal = ( ) => {
101
- setKubeConfigModal ( false )
101
+ setShowKubeConfigModal ( false )
102
+ setSelectedClusterName ( '' )
102
103
}
103
104
104
105
const renderClusterList = ( ) => (
Original file line number Diff line number Diff line change @@ -87,5 +87,5 @@ export const getSortedClusterList = (
87
87
}
88
88
89
89
export const parseSearchParams = ( searchParams : URLSearchParams ) => ( {
90
- clusterFilter : ( searchParams . get ( 'clusterFilter' ) as ClusterFiltersType ) || ClusterFiltersType . ALL_CLUSTERS ,
90
+ clusterFilter : ( searchParams . get ( 'clusterFilter' ) as ClusterFiltersType ) ?? ClusterFiltersType . ALL_CLUSTERS ,
91
91
} )
You can’t perform that action at this time.
0 commit comments