File tree Expand file tree Collapse file tree 1 file changed +26
-11
lines changed
portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole Expand file tree Collapse file tree 1 file changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const StyledTableCell = styled(TableCell)(() => ({
3232 paddingLeft : '0' ,
3333 paddingTop : '0' ,
3434 textAlign : 'left' ,
35+ verticalAlign : 'top' ,
3536} ) ) ;
3637
3738const StyledScopeCell = styled ( TableCell ) ( ( ) => ( {
@@ -40,8 +41,15 @@ const StyledScopeCell = styled(TableCell)(() => ({
4041 textAlign : 'left' ,
4142 borderBottom : 'none' ,
4243 overflow : 'hidden' ,
43- textOverflow : 'ellipsis' ,
44- whiteSpace : 'nowrap' ,
44+ wordBreak : 'break-word' ,
45+ whiteSpace : 'normal' ,
46+ } ) ) ;
47+
48+ const ScrollContainer = styled ( 'div' ) ( ( ) => ( {
49+ maxHeight : '150px' ,
50+ overflowY : 'scroll' ,
51+ display : 'block' ,
52+ width : '100%' ,
4553} ) ) ;
4654
4755/**
@@ -136,16 +144,23 @@ function CustomPadLock(props) {
136144 defaultMessage = 'Scopes'
137145 />
138146 </ StyledTableCell >
139- < StyledTableCell style = { { maxWidth : 100 , paddingRight : 0 } } >
147+ < StyledTableCell style = { { maxWidth : 250 , paddingRight : 0 } } >
140148 { scopes . length > 0 && (
141- scopes . map ( ( scope , index ) => (
142- // eslint-disable-next-line react/no-array-index-key
143- < TableRow key = { index } >
144- < StyledScopeCell style = { { maxWidth : 100 } } >
145- { scope }
146- </ StyledScopeCell >
147- </ TableRow >
148- ) )
149+ < ScrollContainer
150+ style = { scopes . length <= 5 ? { overflowY : 'visible' , maxHeight : 'none' } : { } }
151+ >
152+ < Table >
153+ < TableBody >
154+ { scopes . map ( ( scope ) => (
155+ < TableRow key = { scope } >
156+ < StyledScopeCell style = { { maxWidth : 240 } } >
157+ { scope }
158+ </ StyledScopeCell >
159+ </ TableRow >
160+ ) ) }
161+ </ TableBody >
162+ </ Table >
163+ </ ScrollContainer >
149164 ) }
150165 </ StyledTableCell >
151166 </ TableRow >
You can’t perform that action at this time.
0 commit comments