diff --git a/src/components/SelectComponents/SelectDropdown/SelectDropdown.tsx b/src/components/SelectComponents/SelectDropdown/SelectDropdown.tsx
index 7b0e4bb53..0abba20ce 100644
--- a/src/components/SelectComponents/SelectDropdown/SelectDropdown.tsx
+++ b/src/components/SelectComponents/SelectDropdown/SelectDropdown.tsx
@@ -232,6 +232,7 @@ export const SelectDropdown: SelectDropdownComponent = (props) => {
}),
cnMixScrollBar(),
])}
+ key={cnSelectDropdown('ScrollContainer')}
ref={dropdownRef}
>
{isLoading && !isListShowed && }
diff --git a/src/hooks/useVirtualScroll/helpers.ts b/src/hooks/useVirtualScroll/helpers.ts
index 2d325ca58..0e22524d7 100644
--- a/src/hooks/useVirtualScroll/helpers.ts
+++ b/src/hooks/useVirtualScroll/helpers.ts
@@ -36,7 +36,7 @@ export const useScroll = (
return () => {
ref.current?.removeEventListener('scroll', fn);
};
- }, [ref.current, fn, isActive]);
+ }, [ref.current, isActive]);
};
export const getElementHeight = (el: HTMLElement | SVGGraphicsElement | null) =>
diff --git a/src/utils/getGroups.ts b/src/utils/getGroups.ts
index 1807680f7..e81ef5d8a 100644
--- a/src/utils/getGroups.ts
+++ b/src/utils/getGroups.ts
@@ -125,15 +125,17 @@ export function getCountedGroups- (
checkedCount += 1;
}
});
- copyGroups[index].items = [
- {
- __optionSelectAll: true,
- totalCount,
- groupKey: group.key,
- checkedCount,
- },
- ...copyGroups[index].items,
- ];
+ copyGroups[index].items = copyGroups[index].items.length
+ ? [
+ {
+ __optionSelectAll: true,
+ totalCount,
+ groupKey: group.key,
+ checkedCount,
+ },
+ ...copyGroups[index].items,
+ ]
+ : copyGroups[index].items;
});
}
return copyGroups;