We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31a7de5 commit 866a7e5Copy full SHA for 866a7e5
src/hooks/useSearchConfig.ts
@@ -1,3 +1,4 @@
1
+
2
import warning from 'rc-util/lib/warning';
3
import * as React from 'react';
4
import type { CascaderProps, ShowSearchType } from '../Cascader';
@@ -22,7 +23,7 @@ export default function useSearchConfig(showSearch?: CascaderProps['showSearch']
22
23
}
24
25
if ((searchConfig.limit as number) <= 0) {
- delete searchConfig.limit;
26
+ searchConfig.limit = false;
27
28
if (process.env.NODE_ENV !== 'production') {
29
warning(false, "'limit' of showSearch should be positive number or false.");
0 commit comments