From 3cff682ae49bfa504d0b1fbf53d69fe83ea8cbb4 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 20 Jan 2021 12:35:09 -0800 Subject: [PATCH] Remove unnecessary addItem from DeclarativeTable component (#13997) --- .../declarativeTable.component.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/sql/workbench/browser/modelComponents/declarativeTable.component.ts b/src/sql/workbench/browser/modelComponents/declarativeTable.component.ts index 9843096060..eb26894165 100644 --- a/src/sql/workbench/browser/modelComponents/declarativeTable.component.ts +++ b/src/sql/workbench/browser/modelComponents/declarativeTable.component.ts @@ -277,23 +277,6 @@ export default class DeclarativeTableComponent extends ContainerBase { - for (let i = 0; i < row.length; i++) { - if (this.isComponent(i)) { - const itemDescriptor = this.getItemDescriptor(row[i].value as string); - if (itemDescriptor) { - this.addToContainer(itemDescriptor, {}); - } else { - // This should ideally never happen but it's possible for a race condition to happen when adding/removing components quickly where - // the child component is unregistered after it is defined because a component is only unregistered when it's destroyed by Angular - // which can take a while and we don't wait on that to happen currently. - // While this happening isn't desirable it typically doesn't have a huge impact since the component will still be displayed properly in - // most cases - this.logService.warn(`Could not find ItemDescriptor for component ${row[i].value} when adding to DeclarativeTable ${this.descriptor.id}`); - } - } - } - }); } super.setProperties(properties); }