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

Force render prop to fix calendar rendering issue in Safari #1831

Open
wants to merge 4 commits into
base: master
from

Conversation

@povilasDadelo
Copy link

commented Oct 7, 2019

Closes #1829 issue

@@ -54,7 +54,9 @@ const YEAR_SELECTION_TRANSITION = 'year_selection';

const propTypes = forbidExtraProps({
...withStylesPropTypes,

// forked additional props
forceRender: PropTypes.bool,

This comment has been minimized.

Copy link
@ljharb

ljharb Oct 7, 2019

Collaborator

I’m confused why this is needed - can you not force a render by passing a different object down?

@@ -361,6 +364,10 @@ class DayPicker extends React.PureComponent {
if (!prevProps.isFocused && isFocused && !focusedDate) {
this.container.focus();
}

if (prevProps.forceRender !== forceRender) {

This comment has been minimized.

Copy link
@ljharb

ljharb Oct 7, 2019

Collaborator

this means that going from true to false also triggers the logic

@@ -1174,6 +1176,7 @@ export default class DayPickerRangeController extends React.PureComponent {
transitionDuration,
verticalBorderSpacing,
horizontalMonthPadding,
forceRender

This comment has been minimized.

Copy link
@ljharb

ljharb Oct 7, 2019

Collaborator

this prop isn’t forcing this component to rerender, so it seems confusing to only pass it down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.