We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b23bfc2 commit c4b2e13Copy full SHA for c4b2e13
src/utils/warningPropsUtil.ts
@@ -36,10 +36,14 @@ function warningProps(props: TreeSelectProps & { searchPlaceholder?: string }) {
36
warning(!Array.isArray(value), '`value` should not be array when `TreeSelect` is single mode.');
37
}
38
39
- if (maxCount && (showCheckedStrategy === 'SHOW_ALL' || showCheckedStrategy === 'SHOW_PARENT')) {
+ if (
40
+ maxCount &&
41
+ ((showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly) ||
42
+ showCheckedStrategy === 'SHOW_PARENT')
43
+ ) {
44
warning(
45
false,
- '`maxCount` not work with `showCheckedStrategy=SHOW_ALL` or `showCheckedStrategy=SHOW_PARENT`.',
46
+ '`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.',
47
);
48
49
0 commit comments