mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -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;
|
||||
if (insertBefore && index) {
|
||||
this._tabOrder.copyWithin(index + 1, index);
|
||||
this._tabOrder[index] = tab.tab.identifier;
|
||||
if (insertBefore) {
|
||||
this._tabOrder.copyWithin(index! + 1, index!);
|
||||
this._tabOrder[index!] = tab.tab.identifier;
|
||||
this.tabList.insertBefore(tabHeaderElement, insertBefore);
|
||||
} else {
|
||||
this.tabList.append(tabHeaderElement);
|
||||
|
||||
Reference in New Issue
Block a user