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

Bugfix: Better Day.shouldComponentUpdate implementation and exporting… #452

Merged
merged 1 commit into from Jul 9, 2017

Conversation

2 participants
@oigewan

oigewan commented Jul 7, 2017

Bugs:
Fixes #446

The Day.shouldComponentUpdate method was not allowing days to update when anything other than modifiers changed. This can lead to buggy behavior if many public props of DayPicker change.

Also, the NavbarPropTypes and WeekdayPropTypes were being exported incorrectly starting here: 0b5a46f

Changes:

  • Export propTypes directly off of components inside of DayPicker.js where appropriate.
  • For most props in Day, do a shallow compare to determine the return value of shouldComponentUpdate. However, modifiers and modifiersStyles need their own shallow compare as well, so make an exception for them.

cc: @gpbl

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Jul 7, 2017

Codecov Report

Merging #452 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #452   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         512    528   +16     
  Branches      104    109    +5     
=====================================
+ Hits          512    528   +16
Impacted Files Coverage Δ
src/Day.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd54b02...950134f. Read the comment docs.

codecov bot commented Jul 7, 2017

Codecov Report

Merging #452 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #452   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         512    528   +16     
  Branches      104    109    +5     
=====================================
+ Hits          512    528   +16
Impacted Files Coverage Δ
src/Day.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd54b02...950134f. Read the comment docs.

@gpbl gpbl added this to the v6.0.6 milestone Jul 9, 2017

@gpbl gpbl merged commit fdb06a1 into gpbl:master Jul 9, 2017

3 checks passed

ci/circleci: checkout-and-test Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 100%)
Details
codecov/project 100% (+0%) compared to dd54b02
Details
@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jul 9, 2017

Owner

Thanks! 🌈

Owner

gpbl commented Jul 9, 2017

Thanks! 🌈

@oigewan oigewan deleted the oigewan:day branch Jul 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment