Skip to content

Commit 866a7e5

Browse files
committed
fix: antd-issue-51248
1 parent 31a7de5 commit 866a7e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useSearchConfig.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import warning from 'rc-util/lib/warning';
23
import * as React from 'react';
34
import type { CascaderProps, ShowSearchType } from '../Cascader';
@@ -22,7 +23,7 @@ export default function useSearchConfig(showSearch?: CascaderProps['showSearch']
2223
}
2324

2425
if ((searchConfig.limit as number) <= 0) {
25-
delete searchConfig.limit;
26+
searchConfig.limit = false;
2627

2728
if (process.env.NODE_ENV !== 'production') {
2829
warning(false, "'limit' of showSearch should be positive number or false.");

0 commit comments

Comments
 (0)