Skip to content

Commit baca4e2

Browse files
committed
fix(Dropdown): when disabled chip has extra class
1 parent 9f15af8 commit baca4e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/components/Dropdown/hooks/useHiddenOptionsData.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export function useHiddenOptionsData({
1919

2020
while (childIndex < ref.children.length && optionIndex < selectedOptionsCount) {
2121
const child = ref.children[childIndex];
22-
const isOption = child.classList.contains(chipClassName) || child.classList.contains(chipWrapperClassName);
22+
const chipClasses = chipClassName.split(" ");
23+
24+
const isOption =
25+
child.classList.contains(chipWrapperClassName) ||
26+
chipClasses.some(className => child.classList.contains(className));
2327

2428
if (isOption) {
2529
const { bottom: childBottom } = child.getBoundingClientRect();

0 commit comments

Comments
 (0)