Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: antd-issue-51248 #541

Merged
merged 6 commits into from
Oct 16, 2024
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
Next Next commit
fix: antd-issue-51248
dongbanban committed Oct 15, 2024
commit 866a7e5dda2f2f8a5767a25df5c0c2791543ef5b
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';
@@ -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.");