@@ -14,6 +14,7 @@ import { Flex } from '../../primitives/Flex';
14
14
import { Typography } from '../../primitives/Typography' ;
15
15
import { ANIMATIONS } from '../../styles/motion' ;
16
16
import { inputFocusStyle } from '../../themes' ;
17
+ import { ScrollArea } from '../../utilities/ScrollArea' ;
17
18
import { Field , useField } from '../Field' ;
18
19
import { Loader } from '../Loader' ;
19
20
@@ -264,33 +265,35 @@ const Combobox = React.forwardRef<ComboboxInputElement, ComboboxProps>(
264
265
</ Trigger >
265
266
< ComboboxPrimitive . Portal >
266
267
< Content sideOffset = { 4 } >
267
- < Viewport ref = { viewportRef } >
268
- { children }
269
- { creatable ? (
270
- < ComboboxPrimitive . CreateItem
271
- onPointerUp = { handleCreateItemClick }
272
- onClick = { handleCreateItemClick }
273
- asChild
274
- >
275
- < OptionBox >
276
- < Typography > { createMessage ( internalTextValue ?? '' ) } </ Typography >
277
- </ OptionBox >
278
- </ ComboboxPrimitive . CreateItem >
279
- ) : null }
280
- { ! creatable && ! loading ? (
281
- < ComboboxPrimitive . NoValueFound asChild >
282
- < OptionBox $hasHover = { false } >
283
- < Typography > { noOptionsMessage ( internalTextValue ?? '' ) } </ Typography >
284
- </ OptionBox >
285
- </ ComboboxPrimitive . NoValueFound >
286
- ) : null }
287
- { loading ? (
288
- < Flex justifyContent = "center" alignItems = "center" paddingTop = { 2 } paddingBottom = { 2 } >
289
- < Loader small > { loadingMessage } </ Loader >
290
- </ Flex >
291
- ) : null }
292
- < Box id = { intersectionId } width = "100%" height = "1px" />
293
- </ Viewport >
268
+ < ScrollArea >
269
+ < Viewport ref = { viewportRef } >
270
+ { children }
271
+ { creatable ? (
272
+ < ComboboxPrimitive . CreateItem
273
+ onPointerUp = { handleCreateItemClick }
274
+ onClick = { handleCreateItemClick }
275
+ asChild
276
+ >
277
+ < OptionBox >
278
+ < Typography > { createMessage ( internalTextValue ?? '' ) } </ Typography >
279
+ </ OptionBox >
280
+ </ ComboboxPrimitive . CreateItem >
281
+ ) : null }
282
+ { ! creatable && ! loading ? (
283
+ < ComboboxPrimitive . NoValueFound asChild >
284
+ < OptionBox $hasHover = { false } >
285
+ < Typography > { noOptionsMessage ( internalTextValue ?? '' ) } </ Typography >
286
+ </ OptionBox >
287
+ </ ComboboxPrimitive . NoValueFound >
288
+ ) : null }
289
+ { loading ? (
290
+ < Flex justifyContent = "center" alignItems = "center" paddingTop = { 2 } paddingBottom = { 2 } >
291
+ < Loader small > { loadingMessage } </ Loader >
292
+ </ Flex >
293
+ ) : null }
294
+ < Box id = { intersectionId } width = "100%" height = "1px" />
295
+ </ Viewport >
296
+ </ ScrollArea >
294
297
</ Content >
295
298
</ ComboboxPrimitive . Portal >
296
299
</ ComboboxPrimitive . Root >
0 commit comments