Skip to content

Commit

Permalink
fix(rerender): fix table infinite rerender (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvelSQ committed Feb 24, 2022
1 parent fcf204a commit da4b36b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Table.tsx
Expand Up @@ -235,13 +235,15 @@ interface TableRowProps extends RowProps {
depth?: number;
}

const DATA_PLACEHOLDER = [];

const Table = React.forwardRef((props: TableProps, ref) => {
const {
affixHeader,
children,
classPrefix,
className,
data: dataProp = [],
data: dataProp = DATA_PLACEHOLDER,
defaultSortType = SORT_TYPE.DESC as SortType,
width: widthProp,
expandedRowKeys: expandedRowKeysProp,
Expand Down

0 comments on commit da4b36b

Please sign in to comment.