Skip to content

Commit 80888ed

Browse files
committed
chore: use queryString instead of k8sversion
1 parent e548e32 commit 80888ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/ClusterNodes/NodeDetailsList.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ export default function NodeDetailsList({ isSuperAdmin, renderRefreshBar, addTab
133133
const qs = queryString.parse(location.search)
134134
const offset = Number(qs['offset'])
135135
setNodeListOffset(offset || 0)
136-
if (k8sVersion && k8sVersion !== selectedVersion.value) {
137-
setSelectedVersion({ label: `K8s version: ${k8sVersion}`, value: k8sVersion })
136+
const version = qs['k8sversion']
137+
if (version && typeof version === 'string' && selectedVersion.value !== version) {
138+
setSelectedVersion({ label: `K8s version: ${version}`, value: version })
138139
}
139-
}, [location.search, k8sVersion])
140+
}, [location.search])
140141

141142
useEffect(() => {
142143
if (filteredFlattenNodeList) {

0 commit comments

Comments
 (0)