Skip to content
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
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
---

Fixed a bug where `DataTable` summary row would not properly inherit type defined in `columnContentTypes` prop
4 changes: 2 additions & 2 deletions polaris-react/src/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ class DataTableInner extends PureComponent<CombinedProps, DataTableState> {
}) => {
const fixedFirstColumns = this.fixedFirstColumns();
const id = `totals-cell-${index}`;
const {truncate = false, verticalAlign} = this.props;
const {truncate = false, verticalAlign, columnContentTypes} = this.props;

let content;
let contentType;
Expand All @@ -862,7 +862,7 @@ class DataTableInner extends PureComponent<CombinedProps, DataTableState> {
}

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

Expand Down