File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,11 @@ class DateRangePicker extends React.PureComponent {
318318 responsivizePickerPosition ( ) {
319319 // It's possible the portal props have been changed in response to window resizes
320320 // So let's ensure we reset this back to the base state each time
321- this . setState ( { dayPickerContainerStyles : { } } ) ;
321+ const { dayPickerContainerStyles } = this . state ;
322+
323+ if ( Object . keys ( dayPickerContainerStyles ) . length > 0 ) {
324+ this . setState ( { dayPickerContainerStyles : { } } ) ;
325+ }
322326
323327 if ( ! this . isOpened ( ) ) {
324328 return ;
@@ -332,7 +336,6 @@ class DateRangePicker extends React.PureComponent {
332336 withFullScreenPortal,
333337 appendToBody,
334338 } = this . props ;
335- const { dayPickerContainerStyles } = this . state ;
336339
337340 const isAnchoredLeft = anchorDirection === ANCHOR_LEFT ;
338341 if ( ! withPortal && ! withFullScreenPortal ) {
You can’t perform that action at this time.
0 commit comments