|
|
@@ -31,9 +31,10 @@ import SectionRow from './SectionRow';
|
|
|
import TableHeader from '../TableHeader';
|
|
|
import ConfigContext from '../../configProvider/context';
|
|
|
import TableContext, { TableContextProps } from '../table-context';
|
|
|
-import {
|
|
|
+import type {
|
|
|
ExpandedRowRender,
|
|
|
Virtualized,
|
|
|
+ VirtualizedItemSize,
|
|
|
GetVirtualizedListRef,
|
|
|
ColumnProps,
|
|
|
Size,
|
|
|
@@ -253,9 +254,9 @@ class Body extends BaseComponent<BodyProps, BodyState> {
|
|
|
const virtualizedItem = get(virtualizedData, index);
|
|
|
const defaultConfig = getDefaultVirtualizedRowConfig(tableSize, virtualizedItem.sectionRow);
|
|
|
|
|
|
- const itemSize = get(virtualized, 'itemSize', defaultConfig.height);
|
|
|
+ const itemSize = get(virtualized, 'itemSize', defaultConfig.height) as VirtualizedItemSize;
|
|
|
|
|
|
- let realSize = itemSize;
|
|
|
+ let realSize = itemSize as number;
|
|
|
|
|
|
if (typeof itemSize === 'function') {
|
|
|
realSize = itemSize(index, {
|
|
|
@@ -279,7 +280,7 @@ class Body extends BaseComponent<BodyProps, BodyState> {
|
|
|
};
|
|
|
|
|
|
handleVirtualizedScroll = (props = {}) => {
|
|
|
- const onScroll = get(this.props.virtualized, 'onScroll');
|
|
|
+ const onScroll: undefined | ((props?: any) => void) = get(this.props.virtualized, 'onScroll');
|
|
|
if (typeof onScroll === 'function') {
|
|
|
onScroll(props);
|
|
|
}
|
|
|
@@ -760,8 +761,8 @@ class Body extends BaseComponent<BodyProps, BodyState> {
|
|
|
const tableStyle: {
|
|
|
width?: string | number
|
|
|
} = {};
|
|
|
- const Table = get(components, 'body.outer', 'table');
|
|
|
- const BodyWrapper = get(components, 'body.wrapper') || 'tbody';
|
|
|
+ const Table = get(components, 'body.outer', 'table') as unknown as typeof React.Component;
|
|
|
+ const BodyWrapper = (get(components, 'body.wrapper') || 'tbody') as unknown as typeof React.Component;
|
|
|
|
|
|
if (y) {
|
|
|
bodyStyle.maxHeight = y;
|