Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions .changeset/brave-ways-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Fixes bug where `DataTable` summary row would not properly inherit type defined in `columnContentTypes` prop
4 changes: 3 additions & 1 deletion polaris-react/src/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,8 @@ class DataTableInner extends PureComponent<CombinedProps, DataTableState> {
const id = `totals-cell-${index}`;
const {truncate = false, verticalAlign} = this.props;

const {columnContentTypes} = this.props;

let content;
let contentType;

Expand All @@ -862,7 +864,7 @@ class DataTableInner extends PureComponent<CombinedProps, DataTableState> {
}

if (total !== '' && index > 0) {
contentType = 'numeric';
contentType = columnContentTypes[index];
content = total;
}

Expand Down