Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#7592 table default integer format should not be formatted #7599

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/notebook/src/tableDisplay/dataGrid/dataTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down