Skip to content

Commit eb3c6dc

Browse files
committed
feat: no use fullHeight if content is less
1 parent b1d24ca commit eb3c6dc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"rc-animate": "^2.10.0",
4444
"rc-trigger": "^2.6.5",
4545
"rc-util": "^4.11.0",
46-
"rc-virtual-list": "^0.0.0-alpha.23",
46+
"rc-virtual-list": "^0.0.0-alpha.24",
4747
"warning": "^4.0.3"
4848
},
4949
"devDependencies": {

src/OptionList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {
1111
} from './interface';
1212
import { RawValueType, FlattenOptionsType } from './interface/generator';
1313

14-
// TODO: Not use virtual list if options count is less than a certain number
15-
1614
export interface OptionListProps<OptionsType extends object[]> {
1715
prefixCls: string;
1816
id: string;
@@ -224,6 +222,7 @@ const OptionList: React.RefForwardingComponent<
224222
data={flattenOptions}
225223
height={height}
226224
itemHeight={itemHeight}
225+
fullHeight={false}
227226
onMouseDown={onListMouseDown}
228227
onScroll={onScroll}
229228
>

0 commit comments

Comments
 (0)