a few table designer improvements (#17588)

This commit is contained in:
Alan Ren
2021-11-03 17:57:47 -07:00
committed by GitHub
parent 6ae8db35df
commit f3e1c2cc8b
4 changed files with 78 additions and 41 deletions

View File

@@ -232,7 +232,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
columnProperties.push(...designerInfo.view.additionalTableColumnProperties);
}
const columnsTableProperties = designerInfo.view.columnsTableProperties || [
const columnsTableProperties = designerInfo.view.columnsTableProperties?.length > 0 ? designerInfo.view.columnsTableProperties : [
designers.TableColumnProperty.Name,
designers.TableColumnProperty.Type,
designers.TableColumnProperty.Length,
@@ -253,7 +253,9 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
ariaLabel: localize('tableDesigner.columnsTabTitle', "Columns"),
columns: columnsTableProperties,
itemProperties: columnProperties,
objectTypeDisplayName: localize('tableDesigner.columnTypeName', "Column")
objectTypeDisplayName: localize('tableDesigner.columnTypeName', "Column"),
canAddRows: designerInfo.view.canAddColumns,
canRemoveRows: designerInfo.view.canRemoveColumns
}
}
]