fix: clean selected keys after deleted
This commit is contained in:
parent
23087a5374
commit
ac6d68d17d
|
@ -127,6 +127,7 @@ 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)
|
||||||
|
if (node != null) {
|
||||||
const { type = ConnectionType.RedisValue, redisKey } = node
|
const { type = ConnectionType.RedisValue, redisKey } = node
|
||||||
if (type === ConnectionType.RedisKey) {
|
if (type === ConnectionType.RedisKey) {
|
||||||
// has prefix
|
// has prefix
|
||||||
|
@ -134,6 +135,7 @@ const onAddKey = () => {
|
||||||
return
|
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