Skip to content
Open
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
46 changes: 33 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/TableRenderers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function makeRenderer(opts = {}) {
class TableRenderer extends React.PureComponent {
render() {
const pivotData = new PivotData(this.props);
const id = pivotData.props.id;
const colAttrs = pivotData.props.cols;
const rowAttrs = pivotData.props.rows;
const rowKeys = pivotData.getRowKeys();
Expand Down Expand Up @@ -133,7 +134,7 @@ function makeRenderer(opts = {}) {
: null;

return (
<table className="pvtTable">
<table id={id} className="pvtTable">
<thead>
{colAttrs.map(function(c, j) {
return (
Expand Down
2 changes: 2 additions & 0 deletions src/Utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ PivotData.forEachRecord = function(input, derivedAttributes, f) {
};

PivotData.defaultProps = {
id:"pvtTable",
aggregators: aggregators,
cols: [],
rows: [],
Expand All @@ -783,6 +784,7 @@ PivotData.defaultProps = {
};

PivotData.propTypes = {
id: PropTypes.string,
data: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func])
.isRequired,
aggregatorName: PropTypes.string,
Expand Down