Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: plouc/nivo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: LFDM/nivo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 4, 2020

  1. fix(area-bump): Return a new serie reference when color or styles change

    Consumers of the series object, like the AreaBump chart component itself, might rely on memoization and shallow equality comparisons of incoming props.
    Mutating the serie object led to a stuck state e.g. on hover, as described in #1301.
    
    Mind that we cannot just
    ```
    return { ...serie, color: getColor(serie), style: getSerieStyle(serie) };
    ```
    as `getSerieStyle` can depend on on the results of `getColor`. The functions therefore need to be applied sequentially and in this order.
    
    Fixes #1301
    LFDM committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    412f0de View commit details
    Browse the repository at this point in the history
  2. fix(bump): Return a new serie reference when color or styles change

    This is the same fix as applied to area-bump in 412f0de
    Contrary to area-bump, the previous implementation didn't lead to a visible bug, as whenever e.g. someone hovers over the graph, the memoization of the rendering component is broken by another object anyway, hence it doesn't matter that from a React's perspective the series objects are still the same.
    
    Therefore this commit can be seen as a preemptive measure to avoid future problems.
    LFDM committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    5294f62 View commit details
    Browse the repository at this point in the history
Loading