Skip to content

Commit d3588b6

Browse files
committed
fixed that the select dropdown menu wasn't working in a modal
1 parent 194ee9e commit d3588b6

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

library/src/components/Modal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ function Container({
9191
}
9292
id={id}
9393
data-testid={testId}
94+
onWheel={(e) => {
95+
e.stopPropagation() // this is necessary or scrolling will not work in the select dropdown menu in the modal
96+
}}
9497
>
9598
<VisuallyHidden>
9699
<RDialog.DialogDescription>

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"stylelint-config-tailwindcss": "^0.0.7",
157157
"stylelint-order": "^6.0.4",
158158
"tailwind-merge": "^2.5.4",
159-
"tailwindcss": "^3.4.13",
159+
"tailwindcss": "^3.4.14",
160160
"typescript": "^5.6.3",
161161
"typescript-plugin-css-modules": "^5.1.0",
162162
"vite": "^5.4.9",

showcase/src/components/showcase/wrapper/ModalShowcase.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ function ControlledExample() {
170170
}}
171171
shouldCloseOnEscapePress={true}
172172
accessibleDialogDescription="This is a modal dialog example"
173+
useModal={true}
173174
>
174175
<Modal.Header>
175176
<Modal.Title accessibleDialogTitle="Sample Modal">
@@ -195,6 +196,7 @@ function ControlledExample() {
195196
placeholder="Choose..."
196197
options={selectOptions}
197198
menuPlacement="top"
199+
menuIsOpen
198200
/>
199201
<Dropdown.Menu
200202
className="w-full"

0 commit comments

Comments
 (0)