Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
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
5 changes: 3 additions & 2 deletions src/reactable/table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,10 @@ export class Table extends React.Component {
}
}
}

const {className} = props
const id = props.i
return (
<Tr columns={columns} key={i} data={data} {...props} />
<Tr key={i} i={id} {...{className, data, columns}} />
);
}.bind(this)));
}
Expand Down
4 changes: 2 additions & 2 deletions src/reactable/tr.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { filterPropsFrom } from './lib/filter_props_from';
export class Tr extends React.Component {
render() {
var children = toArray(React.Children.children(this.props.children));

const {className} = this.props
if (
this.props.data &&
this.props.columns &&
Expand Down Expand Up @@ -36,7 +36,7 @@ export class Tr extends React.Component {
}

// Manually transfer props
var props = filterPropsFrom(this.props);
var {i, ...props} = filterPropsFrom(this.props);

return React.DOM.tr(props, children);
}
Expand Down