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)
|
||||
if (selectedKey != null) {
|
||||
const node = browserStore.getNode(selectedKey)
|
||||
const { type = ConnectionType.RedisValue, redisKey } = node
|
||||
if (type === ConnectionType.RedisKey) {
|
||||
// has prefix
|
||||
dialogStore.openNewKeyDialog(redisKey, props.server, props.db)
|
||||
return
|
||||
if (node != null) {
|
||||
const { type = ConnectionType.RedisValue, redisKey } = node
|
||||
if (type === ConnectionType.RedisKey) {
|
||||
// has prefix
|
||||
dialogStore.openNewKeyDialog(redisKey, props.server, props.db)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
dialogStore.openNewKeyDialog('', props.server, props.db)
|
||||
|
|
|
@ -1526,6 +1526,8 @@ const useBrowserStore = defineStore('browser', {
|
|||
// set tab content empty
|
||||
const tab = useTabStore()
|
||||
tab.emptyTab(server)
|
||||
tab.setSelectedKeys(server)
|
||||
tab.setCheckedKeys(server)
|
||||
return true
|
||||
} finally {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue