mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix index for panel push (#7035)
This commit is contained in:
@@ -190,9 +190,9 @@ export class TabbedPanel extends Disposable {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const insertBefore = !isUndefinedOrNull(index) ? this.tabList.children.item(index) : undefined;
|
const insertBefore = !isUndefinedOrNull(index) ? this.tabList.children.item(index) : undefined;
|
||||||
if (insertBefore && index) {
|
if (insertBefore) {
|
||||||
this._tabOrder.copyWithin(index + 1, index);
|
this._tabOrder.copyWithin(index! + 1, index!);
|
||||||
this._tabOrder[index] = tab.tab.identifier;
|
this._tabOrder[index!] = tab.tab.identifier;
|
||||||
this.tabList.insertBefore(tabHeaderElement, insertBefore);
|
this.tabList.insertBefore(tabHeaderElement, insertBefore);
|
||||||
} else {
|
} else {
|
||||||
this.tabList.append(tabHeaderElement);
|
this.tabList.append(tabHeaderElement);
|
||||||
|
|||||||
Reference in New Issue
Block a user