Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support changing withPortal/withFullScreenPortal #659

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

mikelambert
Copy link
Contributor

I am attempting to set withFullScreenPortal in response to the window size (so it only applies on narrow screens). Unfortunately, if responsivizePickerPosition is ever called in widescreen (non portal) mode, and the user shrinks the window width....it will now refrain from ever updating/clearing the dayPickerContainerStyles (since its a portal!). This bug causes the portal to be displayed with an offset, partially offscreen.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 86.179% when pulling 04c4143 on mikelambert:patch-1 into d32e9b3 on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems legitimate to me, esp with the comment. Can you also add the same code to the SingleDatePicker?

I am attempting to set `withFullScreenPortal` in response to the window size (so it only applies on narrow screens). Unfortunately, if `responsivizePickerPosition` is ever called in widescreen (non portal) mode, and the user shrinks the window width....it will now refrain from ever updating/clearing the `dayPickerContainerStyles` (since its a portal!). This bug causes the portal to be displayed with an offset, partially offscreen.
@mikelambert
Copy link
Contributor Author

Good point, updated SingleDatePicker.jsx too.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 86.41% when pulling 51e531b on mikelambert:patch-1 into 9685cc9 on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@majapw majapw merged commit fb26574 into react-dates:master Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants