Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/hooks/useSearchConfig.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import warning from 'rc-util/lib/warning';
import * as React from 'react';
import type { CascaderProps, ShowSearchType } from '../Cascader';
Expand All @@ -22,7 +23,7 @@ export default function useSearchConfig(showSearch?: CascaderProps['showSearch']
}

if ((searchConfig.limit as number) <= 0) {
delete searchConfig.limit;
searchConfig.limit = false;

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