mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
🐛 fix React.createElement undefined
This commit is contained in:
parent
bbc8800cb8
commit
650d44e8a7
@ -137,10 +137,6 @@ function isFiltersChanged<T>(state: TableState<T>, filters: TableStateFilters):
|
||||
}
|
||||
|
||||
class Table<T> extends React.Component<TableProps<T>, TableState<T>> {
|
||||
static Column = Column;
|
||||
|
||||
static ColumnGroup = ColumnGroup;
|
||||
|
||||
static propTypes = {
|
||||
dataSource: PropTypes.array,
|
||||
columns: PropTypes.array,
|
||||
@ -1369,6 +1365,10 @@ function withStore(
|
||||
WrappedComponent: typeof Table,
|
||||
): React.ComponentClass<Omit<TableProps<any>, keyof WithStore>> {
|
||||
class Component<T> extends React.Component<TableProps<T>> {
|
||||
static Column = Column;
|
||||
|
||||
static ColumnGroup = ColumnGroup;
|
||||
|
||||
store: Store;
|
||||
|
||||
CheckboxPropsCache: CheckboxPropsCache;
|
||||
|
@ -63,7 +63,7 @@ export function normalizeColumns(elements: React.ReactChildren) {
|
||||
if (element.key) {
|
||||
column.key = element.key;
|
||||
}
|
||||
if (element.props && (element.props as any).children) {
|
||||
if (element.type && (element.type as any).__ANT_TABLE_COLUMN_GROUP) {
|
||||
column.children = normalizeColumns(column.children);
|
||||
}
|
||||
columns.push(column);
|
||||
|
Loading…
Reference in New Issue
Block a user