mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
Rename TableRow to BodyRow
This commit is contained in:
parent
5970dbb1ec
commit
67336fca7b
@ -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<T> extends React.Component<TableProps<T>, any> {
|
||||
if (!prevComponents || bodyRow !== preBodyRow) {
|
||||
this.components.body = {
|
||||
...components.body,
|
||||
row: createTableRow(bodyRow),
|
||||
row: createBodyRow(bodyRow),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -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<TableRowProps, TableRowState> {
|
||||
class BodyRow extends React.Component<BodyRowProps, BodyRowState> {
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user