@@ -5,6 +5,8 @@ import type { ReactElement } from 'react';
55import { useEffect , memo , useMemo , useRef , useId } from 'react' ;
66import { useTranslation } from 'react-i18next' ;
77
8+ import { CustomScrollbars } from '../../../components/CustomScrollbars' ;
9+
810export type ComposerBoxPopupProps <
911 T extends {
1012 _id : string ;
@@ -91,26 +93,28 @@ function ComposerBoxPopup<
9193 { title }
9294 </ Box >
9395 ) }
94- < Box pb = { 8 } maxHeight = 'x320' >
95- { ! isLoading && itemsFlat . length === 0 && < Option > { t ( 'No_results_found' ) } </ Option > }
96- { isLoading && < OptionSkeleton /> }
97- { itemsFlat . map ( ( item , index ) => {
98- return (
99- < Option
100- title = { getOptionTitle ( item ) }
101- onClick = { ( ) => select ( item ) }
102- selected = { item === focused }
103- key = { index }
104- id = { `popup-item-${ item . _id } ` }
105- tabIndex = { item === focused ? 0 : - 1 }
106- aria-selected = { item === focused }
107- disabled = { item . disabled }
108- >
109- { renderItem ( { item : { ...item , variant } } ) }
110- </ Option >
111- ) ;
112- } ) }
113- </ Box >
96+ < CustomScrollbars >
97+ < Box pb = { 8 } maxHeight = 'x320' >
98+ { ! isLoading && itemsFlat . length === 0 && < Option > { t ( 'No_results_found' ) } </ Option > }
99+ { isLoading && < OptionSkeleton /> }
100+ { itemsFlat . map ( ( item , index ) => {
101+ return (
102+ < Option
103+ title = { getOptionTitle ( item ) }
104+ onClick = { ( ) => select ( item ) }
105+ selected = { item === focused }
106+ key = { index }
107+ id = { `popup-item-${ item . _id } ` }
108+ tabIndex = { item === focused ? 0 : - 1 }
109+ aria-selected = { item === focused }
110+ disabled = { item . disabled }
111+ >
112+ { renderItem ( { item : { ...item , variant } } ) }
113+ </ Option >
114+ ) ;
115+ } ) }
116+ </ Box >
117+ </ CustomScrollbars >
114118 </ Tile >
115119 </ Box >
116120 ) ;
0 commit comments