@@ -226,6 +226,7 @@ class Space extends React.Component<AllProps, IState> {
226
226
const currentContext = this . getContext ( parentContext ) ;
227
227
228
228
let spaceRender = this . props . children ;
229
+ let resizeRender = null ;
229
230
230
231
if ( parentContext && this . props . anchor && this . props . resizable ) {
231
232
let resizeType : ResizeType = ResizeType . Left ;
@@ -245,36 +246,34 @@ class Space extends React.Component<AllProps, IState> {
245
246
break ;
246
247
}
247
248
248
- spaceRender =
249
- < >
250
- < Resizable
251
- type = { resizeType }
252
- minimumAdjust = { - ( this . state . parsedSize || 0 ) + ( this . props . minimumSize || 20 ) }
253
- maximumAdjust = { this . props . maximumSize ? ( this . props . maximumSize - ( this . state . parsedSize || 0 ) ) : undefined }
254
- onResize = { ( adjustedSize ) => {
255
- this . setState (
256
- { adjustedSize : adjustedSize } ,
257
- ( ) => {
258
- parentContext . updateSpaceTakerAdjustedSize ( this . state . id , adjustedSize ) ;
259
- } ) ;
260
- } } />
261
- { spaceRender }
262
- </ > ;
249
+ resizeRender =
250
+ < Resizable
251
+ type = { resizeType }
252
+ minimumAdjust = { - ( this . state . parsedSize || 0 ) + ( this . props . minimumSize || 20 ) }
253
+ maximumAdjust = { this . props . maximumSize ? ( this . props . maximumSize - ( this . state . parsedSize || 0 ) ) : undefined }
254
+ onResize = { ( adjustedSize ) => {
255
+ this . setState (
256
+ { adjustedSize : adjustedSize } ,
257
+ ( ) => {
258
+ parentContext . updateSpaceTakerAdjustedSize ( this . state . id , adjustedSize ) ;
259
+ } ) ;
260
+ } } /> ;
263
261
}
264
262
265
263
return (
266
264
< div
267
265
id = { id }
268
266
ref = { this . divElementRef }
269
267
className = { `spaces-space${ this . props . anchor || '' } ${ this . props . scrollable ? ' scrollable' : '' } ${ className ? ` ${ className } ` : `` } ` }
270
- style = { { ...style , ...this . props . style } } >
271
-
272
- < SpaceContext . Provider value = { currentContext } >
273
- < SpaceInfoContext . Provider value = { { width : Math . floor ( this . state . currentWidth ) , height : Math . floor ( this . state . currentHeight ) } } >
274
- { spaceRender }
275
- </ SpaceInfoContext . Provider >
276
- </ SpaceContext . Provider >
277
-
268
+ style = { style } >
269
+ { resizeRender }
270
+ < div className = "spaces-space-inner" style = { this . props . style } >
271
+ < SpaceContext . Provider value = { currentContext } >
272
+ < SpaceInfoContext . Provider value = { { width : Math . floor ( this . state . currentWidth ) , height : Math . floor ( this . state . currentHeight ) } } >
273
+ { spaceRender }
274
+ </ SpaceInfoContext . Provider >
275
+ </ SpaceContext . Provider >
276
+ </ div >
278
277
</ div >
279
278
)
280
279
}
0 commit comments