Skip to content
Snippets Groups Projects
Commit f9fe31de authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

fix bug when exiting with escape and the going to another page

parent 567b9144
No related branches found
No related tags found
No related merge requests found
Pipeline #130200 waiting for manual action with stages
in 8 minutes and 11 seconds
......@@ -65,10 +65,13 @@ function viewPdb(pdbPath: string | null) {
}
}
function closeStructure() {
function emptyBasket() {
selectedPdb.value = null
structureBasket.set(undefined)
}
function closeStructure() {
dialog.value = false
}
watch(selectedPdb, (newSelectedPdb, prevSelectPdb) => {
......@@ -78,6 +81,10 @@ watch(selectedPdb, (newSelectedPdb, prevSelectPdb) => {
}
})
watch(dialog, (newDialog) => {
if (newDialog === false) emptyBasket()
})
watchEffect(() => {
const toValUrl = toValue(structureBasket).structures
if (toValUrl && toValUrl?.length > 0) {
......@@ -89,6 +96,7 @@ watchEffect(() => {
}
})
</script>
<template>
<div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment