fix: tab deleting side effect

This commit is contained in:
liyasthomas
2022-03-24 20:31:26 +05:30
committed by Andrew Bastin
parent 7ea482b7ed
commit bc4d8126f1
3 changed files with 10 additions and 6 deletions

View File

@@ -129,6 +129,10 @@ const removeTabEntry = (tabID: string) => {
}
tabEntries.value.splice(index, 1)
// If we tried to remove the active tabEntries, switch to first tab entry
if (props.value === tabID)
if (tabEntries.value.length > 0) selectTab(tabEntries.value[0][0])
}
provide<TabProvider>("tabs-system", {