question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] `deepPreserveProps` results wrong modifier configuration

See original GitHub issue

Hi. This is a bug report.

Here in this commit you uniqueByName the modifiers that I pass into…

https://github.com/atomiks/tippyjs-react/commit/7198256fe41c8bb347a3aed4f677b8b01dc7629c#diff-3274f1a37032fb0ae4e2823def0007c634e869ae0dfc304ff6a12c36513c3a52R55

And while fixing #264, this function will be called whenever an update is made.

If I have

popperOptions = {
  modifiers: [
    {name: "flip", enabled: true},
    {name: "flip", enabled: false}
  ]
}

deepPreserveProps unique them by their name so I got

popperOptions = {
  modifiers: [
    {name: "flip", enabled: true},
  ]
}

… but actually what I want is

popperOptions = {
  modifiers: [
    {name: "flip", enabled: false}
  ]
}

image

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
atomikscommented, Mar 9, 2021

@KubaJastrz it already is (they get merged). The problem here is just fixing a memory issue with lots of modifiers being re-added when the instance gets updated. Actually the objects might be the same reference, so we could dedupe with a map instead

0reactions
atomikscommented, Mar 10, 2021

So we can’t dedupe with a map, there’s an example in the demo where the reference is always different (in the JSX), but stringify should work in almost all cases, but I’ve merged a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tippys that are nested inside interactive tippys teleport on re ...
I think the wrong calculation positions the nested content with ... [Bug] deepPreserveProps results wrong modifier configuration #290.
Read more >
Opening Modifier Form QPXPRMLS And Getting Forms Error ...
A custom folder is in place. The issue has the following business impact: Due to this issue, users cannot open the modifiers setup...
Read more >
Using causality to diagnose configuration bugs - USENIX
Our results show that comparisons based on dependency sets significantly outperform comparisons based on predicate success or failure, uniquely identi- fying ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found