mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 20:49:14 +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 SelectionCheckboxAll, { SelectionDecorator } from './SelectionCheckboxAll';
|
||||||
import Column, { ColumnProps } from './Column';
|
import Column, { ColumnProps } from './Column';
|
||||||
import ColumnGroup from './ColumnGroup';
|
import ColumnGroup from './ColumnGroup';
|
||||||
import createTableRow from './createTableRow';
|
import createBodyRow from './createBodyRow';
|
||||||
import { flatArray, treeMap, flatFilter, normalizeColumns } from './util';
|
import { flatArray, treeMap, flatFilter, normalizeColumns } from './util';
|
||||||
|
|
||||||
function noop() {
|
function noop() {
|
||||||
@ -945,7 +945,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
|||||||
if (!prevComponents || bodyRow !== preBodyRow) {
|
if (!prevComponents || bodyRow !== preBodyRow) {
|
||||||
this.components.body = {
|
this.components.body = {
|
||||||
...components.body,
|
...components.body,
|
||||||
row: createTableRow(bodyRow),
|
row: createBodyRow(bodyRow),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,19 @@ import classnames from 'classnames';
|
|||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
import { Store } from './createStore';
|
import { Store } from './createStore';
|
||||||
|
|
||||||
interface TableRowProps {
|
interface BodyRowProps {
|
||||||
store: Store;
|
store: Store;
|
||||||
className?: string;
|
className?: string;
|
||||||
rowKey: string;
|
rowKey: string;
|
||||||
prefixCls: string;
|
prefixCls: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TableRowState {
|
interface BodyRowState {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function createTableRow(Component = 'tr') {
|
export default function createTableRow(Component = 'tr') {
|
||||||
class TableRow extends React.Component<TableRowProps, TableRowState> {
|
class BodyRow extends React.Component<BodyRowProps, BodyRowState> {
|
||||||
private store: Store;
|
private store: Store;
|
||||||
private unsubscribe: () => void;
|
private unsubscribe: () => void;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ export default function createTableRow(Component = 'tr') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const rowProps = omit(this.props, ['prefixCls', 'rowKey']);
|
const rowProps = omit(this.props, ['prefixCls', 'rowKey', 'store']);
|
||||||
const className = classnames(
|
const className = classnames(
|
||||||
this.props.className,
|
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