Fixed incorrect tab switching on closing

This commit is contained in:
2023-11-30 08:35:31 +01:00
parent 19e73f0c5d
commit b5fdf0fc9f
2 changed files with 5 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ const activeTabId = ref(0);
const tabs = ref(new Array<TabData>);
tabs.value.push({
id: newTabId.value++,
name: "XML1",
name: "xml1.xml",
data: "",
})
@@ -86,7 +86,7 @@ function addTab() {
tabs.value.push({
id: newTabId.value++,
name: "XML" + newTabId.value,
name: "xml" + newTabId.value + ".xml",
data: ""
});
}
@@ -101,7 +101,7 @@ function removeTab(id : number) {
let indexToRemove = findIndexWithID(id);
switchToExistingTab(indexToRemove)
switchToExistingTab(indexToRemove);
tabs.value.splice(indexToRemove, 1);