From 63caa3c03553ef001c4be555fca181a4768b8bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pior?= Date: Thu, 28 Jun 2018 14:58:48 +0200 Subject: [PATCH] #7592 table default integer format should not be formatted --- js/notebook/src/tableDisplay/dataGrid/dataTypes.ts | 2 +- .../src/tableDisplay/dataGrid/column/DataGridColumn.spec.ts | 2 +- js/notebook/test/src/tableDisplay/dataGrid/dataTypes.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/notebook/src/tableDisplay/dataGrid/dataTypes.ts b/js/notebook/src/tableDisplay/dataGrid/dataTypes.ts index 5f5975da7f..434383a47e 100644 --- a/js/notebook/src/tableDisplay/dataGrid/dataTypes.ts +++ b/js/notebook/src/tableDisplay/dataGrid/dataTypes.ts @@ -51,7 +51,7 @@ export function getDisplayType(type: ALL_TYPES, stringFormatForType?: any, strin } if (type === ALL_TYPES.integer) { - return ALL_TYPES['formatted integer']; + return ALL_TYPES.integer; } if (type === ALL_TYPES.double) { diff --git a/js/notebook/test/src/tableDisplay/dataGrid/column/DataGridColumn.spec.ts b/js/notebook/test/src/tableDisplay/dataGrid/column/DataGridColumn.spec.ts index f24550a2b7..248aa8082e 100644 --- a/js/notebook/test/src/tableDisplay/dataGrid/column/DataGridColumn.spec.ts +++ b/js/notebook/test/src/tableDisplay/dataGrid/column/DataGridColumn.spec.ts @@ -90,7 +90,7 @@ describe('DataGridColumn', () => { }); it('should have the initial displayType set', () => { - expect(bodyDataGridColumn.getDisplayType()).to.equal(ALL_TYPES['formatted integer']); + expect(bodyDataGridColumn.getDisplayType()).to.equal(ALL_TYPES.integer); expect(columnManager.bodyColumns[1].getDisplayType()).to.equal(ALL_TYPES.string); }); diff --git a/js/notebook/test/src/tableDisplay/dataGrid/dataTypes.spec.ts b/js/notebook/test/src/tableDisplay/dataGrid/dataTypes.spec.ts index faccb0552c..d0c369e814 100644 --- a/js/notebook/test/src/tableDisplay/dataGrid/dataTypes.spec.ts +++ b/js/notebook/test/src/tableDisplay/dataGrid/dataTypes.spec.ts @@ -62,7 +62,7 @@ describe('dataTypes', () => { it('should return display type as number', () => { expect(getDisplayType(ALL_TYPES.string)).to.equal(0); - expect(getDisplayType(ALL_TYPES.integer)).to.equal(2); + expect(getDisplayType(ALL_TYPES.integer)).to.equal(1); expect(getDisplayType(ALL_TYPES.int64)).to.equal(0); expect(getDisplayType(ALL_TYPES['formatted integer'])).to.equal(0); expect(getDisplayType(ALL_TYPES['exponential 5'])).to.equal(0);