Skip to content

Commit

Permalink
fix: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aojunhao123 committed Nov 13, 2024
1 parent c77d585 commit 3559f12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OptionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,18 @@ const OptionList: React.ForwardRefRenderFunction<ReviseRefOptionListProps> = (_,
preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys),
);

const isOverMaxCount = React.useMemo<boolean>(
() => multiple && maxCount !== undefined && displayValues?.length >= maxCount,
[multiple, maxCount, displayValues?.length],
);

const onActiveChange = (key: Key) => {
if (isOverMaxCount && !displayValues?.some(v => v.value === key)) {
return;
}
setActiveKey(key);
};

const isOverMaxCount = React.useMemo<boolean>(
() => multiple && maxCount !== undefined && displayValues?.length >= maxCount,
[multiple, maxCount, displayValues?.length],
);

const traverse = (nodes: EventDataNode<any>[]): EventDataNode<any>[] => {
return nodes.map(node => ({
...node,
Expand Down

0 comments on commit 3559f12

Please sign in to comment.