Skip to content

Commit 03a15db

Browse files
committed
height support null
1 parent 2ae4a87 commit 03a15db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class List<T> extends React.Component<ListProps<T>, ListState<T>> {
443443
} = this.props;
444444

445445
// Render pure list if not set height or height is enough for all items
446-
if (height === undefined || data.length * itemHeight <= height) {
446+
if (typeof height !== 'number' || data.length * itemHeight <= height) {
447447
return (
448448
<Component style={height ? { ...style, height, ...ScrollStyle } : style} {...restProps}>
449449
<Filler height={height}>{this.renderChildren(data, 0, children)}</Filler>

0 commit comments

Comments
 (0)