Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

fix: setPopperNode only to update popper instance for HTMLElement #253

Merged
merged 4 commits into from
Dec 11, 2018

Conversation

piecyk
Copy link
Contributor

@piecyk piecyk commented Dec 8, 2018

closes #250

@FezVrasta have a look, need to tweak bit the popper.js mock. We want to call updateStateModifier because it was triggering the infinite loop with setState, after the instance was recreated... Also updated few types to be more strict from ?HTMLElement to HTMLElement | null as the void type is not quite correct there.

src/Popper.js Outdated Show resolved Hide resolved
@piecyk piecyk changed the title Fix setPopperNode only to update popper instance when for HTMLElement Fix setPopperNode only to update popper instance for HTMLElement Dec 8, 2018
src/Popper.js Outdated Show resolved Hide resolved
@piecyk piecyk changed the title Fix setPopperNode only to update popper instance for HTMLElement fix: setPopperNode only to update popper instance for HTMLElement Dec 9, 2018
@piecyk
Copy link
Contributor Author

piecyk commented Dec 9, 2018

When looking closer found out that we have some not needed renders in Popper when placement is not changed. Small change piecyk@9d44f51 https://codesandbox.io/s/3989zky8q

I know the test for it is not very nice 🤔 Basic scheduleUpdate update was called two times after placement was changed... I can create issue for this or submit a PR

@piecyk
Copy link
Contributor Author

piecyk commented Dec 11, 2018

@FezVrasta What do you think about this ?

@FezVrasta
Copy link
Member

It looks good to me, is it ready to be merged?

@piecyk
Copy link
Contributor Author

piecyk commented Dec 11, 2018

Yep, squash and merge 👍

@piecyk
Copy link
Contributor Author

piecyk commented Dec 11, 2018

Did you checkout this comment #253 (comment) ?

@FezVrasta
Copy link
Member

Don't you want to address that in a different PR?

@FezVrasta FezVrasta merged commit 84b27ef into floating-ui:master Dec 11, 2018
@piecyk
Copy link
Contributor Author

piecyk commented Dec 11, 2018

Yes, will do 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite render loop with Downshift
2 participants