[Popper] onUpdate / onCreate not handled
See original GitHub issueonUpdate and onCreate options are overridden in the Popper component, making it difficult to access internal data about the popout / get lifecycle callbacks.
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior 🤔
The popperOptions should support onUpdate and onCreate as per docs (https://github.com/FezVrasta/popper.js#callbacks). i.e. Popper callbacks should be fired when PopperJS creates or “updates” a popup.
Current Behavior 😯
The callbacks do not fire, as they are overridden in the wrapping MUI Popper component.
Steps to Reproduce 🕹
Try to use onUpdate or onCreate options: i.e. <Popper popperOptions={{ onUpdate: data => console.log(data) }} />
Link:
Context 🔦
I am trying to get a callback when the popup is created and get the dimensions of the rendered component.
Your Environment 🌎
| Tech | Version |
|---|---|
| Material-UI | v3.6.0 |
| React | v16.8.1 |
| Browser | Chrome |
| TypeScript | No |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[Popper] onUpdate / onCreate not handled #15262 - GitHub
I am trying to get a callback when the popup is created and get the dimensions of the rendered component. Your Environment. Tech,...
Read more >0.10.1 - react-popper - npm
Handling DOM Elements from React can be complicated. The Manager and Target components handle these complexities for you, so their use is ...
Read more >Popper (v1.×)
The dataObject is an object containing all the information used by Popper.js. This object is passed to modifiers and to the onCreate and...
Read more >Team:PYMS GZ China/JS popper - iGEM 2020
offsetParent will return the closest TH, TD or TABLE in case // no ... will call `onCreate` callback // the other ones will...
Read more >mithriljs/mithril.js - Gitter
When oncreate is called, vnode.dom is defined. But when view is called, vnode.dom is only defined within callbacks. So I can't destructure the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jaipe No objection 😃
@oliviertassinari Sorry - I took a while!! Added a test to your fix, thank you 😃