diff --git a/components/table/Table.tsx b/components/table/Table.tsx index dd02d2c070..58ce2742fe 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -15,7 +15,7 @@ import SelectionBox from './SelectionBox'; import SelectionCheckboxAll, { SelectionDecorator } from './SelectionCheckboxAll'; import Column, { ColumnProps } from './Column'; import ColumnGroup from './ColumnGroup'; -import createTableRow from './createTableRow'; +import createBodyRow from './createBodyRow'; import { flatArray, treeMap, flatFilter, normalizeColumns } from './util'; function noop() { @@ -945,7 +945,7 @@ export default class Table extends React.Component, any> { if (!prevComponents || bodyRow !== preBodyRow) { this.components.body = { ...components.body, - row: createTableRow(bodyRow), + row: createBodyRow(bodyRow), }; } } diff --git a/components/table/createTableRow.tsx b/components/table/createBodyRow.tsx similarity index 87% rename from components/table/createTableRow.tsx rename to components/table/createBodyRow.tsx index f171014c5c..327454f94f 100644 --- a/components/table/createTableRow.tsx +++ b/components/table/createBodyRow.tsx @@ -3,19 +3,19 @@ import classnames from 'classnames'; import omit from 'omit.js'; import { Store } from './createStore'; -interface TableRowProps { +interface BodyRowProps { store: Store; className?: string; rowKey: string; prefixCls: string; } -interface TableRowState { +interface BodyRowState { selected: boolean; } export default function createTableRow(Component = 'tr') { - class TableRow extends React.Component { + class BodyRow extends React.Component { private store: Store; private unsubscribe: () => void; @@ -52,7 +52,7 @@ export default function createTableRow(Component = 'tr') { } render() { - const rowProps = omit(this.props, ['prefixCls', 'rowKey']); + const rowProps = omit(this.props, ['prefixCls', 'rowKey', 'store']); const className = classnames( this.props.className, { @@ -68,5 +68,5 @@ export default function createTableRow(Component = 'tr') { } } - return TableRow; + return BodyRow; }