Fix new table issue (#18974)

* fix new table issue

* fix new table scenario

* simplify logic
This commit is contained in:
Aditya Bist
2022-04-08 11:10:30 -07:00
committed by GitHub
parent cd7c94976c
commit 197d56a29b

View File

@@ -56,7 +56,9 @@ export class TableDesignerInput extends EditorInput {
this._onDidChangeDirty.fire();
}
}));
this._tableIcon = tableInfo.tableIcon.toString() === '' ? TableIcon.Basic : tableInfo.tableIcon as TableIcon;
// default to basic if icon is null (new table) or no sub type
this._tableIcon = tableInfo.tableIcon ? tableInfo.tableIcon as TableIcon : TableIcon.Basic;
this.setEditorLabel();
}