Skip to content

Commit 043527f

Browse files
committed
docs: add maxCount description
1 parent 15472c5 commit 043527f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ online example: https://tree-select-react-component.vercel.app/
7070
| allowClear | whether allowClear | bool | false |
7171
| maxTagTextLength | max tag text length to show | number | - |
7272
| maxTagCount | max tag count to show | number | - |
73+
| maxCount | Limit the maximum number of items that can be selected in multiple mode | number | - |
7374
| maxTagPlaceholder | placeholder for omitted values | ReactNode/function(omittedValues) | - |
7475
| multiple | whether multiple select (true when enable treeCheckable) | bool | false |
7576
| disabled | whether disabled select | bool | false |

src/OptionList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ const OptionList: React.ForwardRefRenderFunction<ReviseRefOptionListProps> = (_,
128128
return;
129129
}
130130

131-
const isSelected = !checkedKeys.includes(node.key);
132-
133131
onSelect(node.key, {
134-
selected: isSelected,
132+
selected: !checkedKeys.includes(node.key),
135133
});
136134

137135
if (!multiple) {

0 commit comments

Comments
 (0)