@@ -226,6 +226,7 @@ class Space extends React.Component<AllProps, IState> {
226226 const currentContext = this . getContext ( parentContext ) ;
227227
228228 let spaceRender = this . props . children ;
229+ let resizeRender = null ;
229230
230231 if ( parentContext && this . props . anchor && this . props . resizable ) {
231232 let resizeType : ResizeType = ResizeType . Left ;
@@ -245,36 +246,34 @@ class Space extends React.Component<AllProps, IState> {
245246 break ;
246247 }
247248
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+ } } /> ;
263261 }
264262
265263 return (
266264 < div
267265 id = { id }
268266 ref = { this . divElementRef }
269267 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 >
278277 </ div >
279278 )
280279 }
0 commit comments