Skip to content

Commit 16a0e73

Browse files
fix(Dropdown): remove scrollbar on tag slot and clicks on icon (#2017)
1 parent 5483b50 commit 16a0e73

File tree

8 files changed

+592
-512
lines changed

8 files changed

+592
-512
lines changed

.changeset/tiny-cooks-relate.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@razorpay/blade": patch
3+
---
4+
5+
fix(Dropdown): remove scrollbar on tag slot and allow clicks on DropdownLink and DropdownButton chevron icons

packages/blade/src/components/Dropdown/Dropdown.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ const _Dropdown = ({
227227
return;
228228
}
229229

230-
const isOutsideClick = !dropdown.contains(target) && !isTagDismissedRef.current?.value;
230+
const isOutsideClick =
231+
!dropdown.contains(target) &&
232+
!isTagDismissedRef.current?.value &&
233+
document.body.contains(target);
231234

232235
const isDropdownOpenState = isDropdownOpenRef.current;
233236
if (isOutsideClick && isDropdownOpenState) {

packages/blade/src/components/Dropdown/__tests__/__snapshots__/Dropdown.ssr.test.tsx.snap

+108-96
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)