fix: clean selected keys after deleted
This commit is contained in:
parent
23087a5374
commit
ac6d68d17d
|
@ -127,11 +127,13 @@ const onAddKey = () => {
|
||||||
const selectedKey = get(browserTreeRef.value?.getSelectedKey(), 0)
|
const selectedKey = get(browserTreeRef.value?.getSelectedKey(), 0)
|
||||||
if (selectedKey != null) {
|
if (selectedKey != null) {
|
||||||
const node = browserStore.getNode(selectedKey)
|
const node = browserStore.getNode(selectedKey)
|
||||||
const { type = ConnectionType.RedisValue, redisKey } = node
|
if (node != null) {
|
||||||
if (type === ConnectionType.RedisKey) {
|
const { type = ConnectionType.RedisValue, redisKey } = node
|
||||||
// has prefix
|
if (type === ConnectionType.RedisKey) {
|
||||||
dialogStore.openNewKeyDialog(redisKey, props.server, props.db)
|
// has prefix
|
||||||
return
|
dialogStore.openNewKeyDialog(redisKey, props.server, props.db)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialogStore.openNewKeyDialog('', props.server, props.db)
|
dialogStore.openNewKeyDialog('', props.server, props.db)
|
||||||
|
|
|
@ -1526,6 +1526,8 @@ const useBrowserStore = defineStore('browser', {
|
||||||
// set tab content empty
|
// set tab content empty
|
||||||
const tab = useTabStore()
|
const tab = useTabStore()
|
||||||
tab.emptyTab(server)
|
tab.emptyTab(server)
|
||||||
|
tab.setSelectedKeys(server)
|
||||||
|
tab.setCheckedKeys(server)
|
||||||
return true
|
return true
|
||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue