diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.spec.ts index cc776ea6e84..460e56a424d 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.spec.ts @@ -20,8 +20,7 @@ import { mockEuropeCountriesData, mockCountriesIncorrectData, mockInvalidSchemaDefinition, - mockSchemaDefinition, - mockSchemaDefinitionWithDifferentTypes + mockSchemaDefinition } from '../../../mocks/data-table-widget.mock'; import { ObjectDataRow } from '@alfresco/adf-core'; @@ -32,14 +31,6 @@ describe('WidgetDataTableAdapter', () => { widgetDataTableAdapter = new WidgetDataTableAdapter(mockEuropeCountriesData, mockSchemaDefinition); }); - it('should set columns type to "text" during initialization', () => { - widgetDataTableAdapter = new WidgetDataTableAdapter(mockEuropeCountriesData, mockSchemaDefinitionWithDifferentTypes); - - widgetDataTableAdapter.getColumns().forEach(column => - expect(column.type).toBe('text') - ); - }); - it('should return rows if all columns are linked to data', () => { const rows = widgetDataTableAdapter.getRows(); diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.ts index f87a5af7646..26d5201f311 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/data-table/data-table-adapter.widget.ts @@ -30,8 +30,6 @@ export class WidgetDataTableAdapter extends ObjectDataTableAdapter { super(data, schema); this.rows = super.getRows(); this.columns = super.getColumns(); - - this.setColumnsTypeToText(); } getRows(): DataRow[] { @@ -55,8 +53,4 @@ export class WidgetDataTableAdapter extends ObjectDataTableAdapter { return availableColumnKeys.every(columnKey => this.rows.some(row => Object.keys(row.obj).includes(columnKey))); } - - private setColumnsTypeToText(): void { - super.setColumns(this.columns.map(column => ({ ...column, type: 'text' }))); - } } diff --git a/lib/process-services-cloud/src/lib/form/mocks/data-table-widget.mock.ts b/lib/process-services-cloud/src/lib/form/mocks/data-table-widget.mock.ts index 85c3cd41d6b..ba06c4696fd 100644 --- a/lib/process-services-cloud/src/lib/form/mocks/data-table-widget.mock.ts +++ b/lib/process-services-cloud/src/lib/form/mocks/data-table-widget.mock.ts @@ -35,23 +35,6 @@ export const mockSchemaDefinition: DataColumn[] = [ } ]; -export const mockSchemaDefinitionWithDifferentTypes: DataColumn[] = [ - { - type: 'json', - key: 'id', - title: 'Country ID', - sortable: true, - draggable: true - }, - { - type: 'date', - key: 'name', - title: 'Country Name', - sortable: true, - draggable: true - } -]; - export const mockInvalidSchemaDefinition: DataColumn[] = [ { type: 'text',