Skip to content

Commit

Permalink
fix(Dropdown): when disabled chip has extra class
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Dec 12, 2024
1 parent 9f15af8 commit baca4e2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export function useHiddenOptionsData({

while (childIndex < ref.children.length && optionIndex < selectedOptionsCount) {
const child = ref.children[childIndex];
const isOption = child.classList.contains(chipClassName) || child.classList.contains(chipWrapperClassName);
const chipClasses = chipClassName.split(" ");

const isOption =
child.classList.contains(chipWrapperClassName) ||
chipClasses.some(className => child.classList.contains(className));

if (isOption) {
const { bottom: childBottom } = child.getBoundingClientRect();
Expand Down

0 comments on commit baca4e2

Please sign in to comment.