Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
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: floating-ui/react-popper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Lean5/react-popper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fixUpdate
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on May 16, 2019

  1. Fix update/re-rendering logic

    Previously, re-rendering a <Popper /> component manually would not update the Popper instance, as long as the `placement` prop did not change and the render function returned a similar DOM tree (so that `popperNode` remained unchanged). E.g., if the render function returned a larger child, Popper.js would not get a chance to re-position the popper element accordingly.
    
    Fix this by always recreating/updating the Popper instance in `componentDidUpdate`, and being somewhat more clever in the `updateStateModifier()` function (just updating the state and hence re-rendering if something of relevance did actually change).
    Martin Kinkelin committed May 16, 2019
    Configuration menu
    Copy the full SHA
    3b255af View commit details
    Browse the repository at this point in the history
Loading