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

Calendar does not rerender when we change "disabled" prop #263

Closed
Jonathan-Jan opened this issue Dec 27, 2017 · 0 comments
Closed

Calendar does not rerender when we change "disabled" prop #263

Jonathan-Jan opened this issue Dec 27, 2017 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@Jonathan-Jan
Copy link
Contributor

Hi,

I don't think that fix for #258 is OK

I don't really get the correction. This way we can't update the disabled prop at runtime. (when disabled the component will no longer re-render).
Why not just add nextProps.disabled !== this.props.disabled ? like this :

shouldComponentUpdate(nextProps, nextState) { return (nextProps.value !== this.props.value) || (this.state.currentMonth !== nextState.currentMonth) || (this.state.currentYear !== nextState.currentYear) || (this.props.minDate !== nextProps.minDate) || (this.props.maxDate !== nextProps.maxDate) || nextProps.disabled !== this.props.disabled; }

@cagataycivici cagataycivici self-assigned this Jan 4, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Jan 4, 2018
@cagataycivici cagataycivici added this to the 1.4.0-RC1 milestone Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants