File tree 4 files changed +25
-6
lines changed
packages/components/modules/messages
4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ const CreateChatRoomList: FC<CreateChatRoomListProps> = ({
102
102
< Virtuoso
103
103
data = { profiles }
104
104
itemContent = { ( _index , item ) => renderItem ( item ) }
105
- style = { { scrollbarWidth : 'none' } }
105
+ // TODO: look for a better way to calculate the height, it doesn't consider different types of headers
106
+ style = { { scrollbarWidth : 'none' , maxHeight : 'calc(100vh - 72px - 57px - 61px - 72px)' } }
106
107
components = { {
107
108
Footer : renderLoadingState ,
108
109
} }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const ConnectionsList: FC<ConnectionsListProps> = ({
45
45
< Virtuoso
46
46
data = { profiles }
47
47
itemContent = { ( _index , item ) => renderItem ( item ) }
48
- style = { { scrollbarWidth : 'none' } }
48
+ style = { { scrollbarWidth : 'none' , maxHeight : '250px' } }
49
49
components = { {
50
50
Footer : renderLoadingState ,
51
51
} }
Original file line number Diff line number Diff line change @@ -33,7 +33,12 @@ import {
33
33
DEFAULT_IMAGE_MAX_SIZE ,
34
34
FORM_VALUE ,
35
35
} from './constants'
36
- import { HeaderContainer , SearchbarContainer , UploadProfileContainer } from './styled'
36
+ import {
37
+ HeaderContainer ,
38
+ ProfilesContainer ,
39
+ SearchbarContainer ,
40
+ UploadProfileContainer ,
41
+ } from './styled'
37
42
import { CreatGroupUpload , CreateGroupProps } from './types'
38
43
import { getImageUrl } from './utils'
39
44
@@ -281,7 +286,7 @@ const CreateGroup: FC<CreateGroupProps> = ({
281
286
/>
282
287
</ Box >
283
288
</ Box >
284
- < Box height = "100%" width = "100%" sx = { { overflowY : 'auto' , scrollbarWidth : 'none' } } >
289
+ < ProfilesContainer >
285
290
< SearchbarContainer >
286
291
< Searchbar
287
292
name = "search"
@@ -304,7 +309,9 @@ const CreateGroup: FC<CreateGroupProps> = ({
304
309
>
305
310
Members
306
311
</ Typography >
307
- { participants . map ( ( member ) => renderItem ( member , true ) ) }
312
+ < Box maxHeight = { 250 } overflow = "auto" sx = { { scrollbarWidth : 'none' } } >
313
+ { participants . map ( ( member ) => renderItem ( member , true ) ) }
314
+ </ Box >
308
315
</ Box >
309
316
< Box
310
317
role = "list"
@@ -329,7 +336,7 @@ const CreateGroup: FC<CreateGroupProps> = ({
329
336
{ ...ConnectionsListProps }
330
337
/>
331
338
</ Box >
332
- </ Box >
339
+ </ ProfilesContainer >
333
340
</ >
334
341
)
335
342
}
Original file line number Diff line number Diff line change @@ -24,3 +24,14 @@ export const UploadProfileContainer = styled(Box)(({ theme }) => ({
24
24
gap : theme . spacing ( 2 ) ,
25
25
padding : theme . spacing ( 1.5 ) ,
26
26
} ) )
27
+
28
+ export const ProfilesContainer = styled ( Box ) ( ( { theme } ) => ( {
29
+ height : '100%' ,
30
+ width : '100%' ,
31
+ overflowY : 'auto' ,
32
+ scrollbarWidth : 'none' ,
33
+ [ theme . breakpoints . down ( 'sm' ) ] : {
34
+ // TODO: look for a better way to calculate the height, it doesn't consider different types of headers
35
+ height : `calc(100vh - 72px - 57px - 305px)` ,
36
+ } ,
37
+ } ) )
You can’t perform that action at this time.
0 commit comments