Got undefined error from Dialog
See original GitHub issueHi @RobinMalfait,
I’m using headlessui/react@dev
and I’m going through an error with the Dialog component:
TypeError: Cannot read property 'Overlay' of undefined
Here the code, copy/pasted from the documentation:
<Dialog open={showForm} onClose={setShowForm}>
<Dialog.Overlay />
<Dialog.Title>Deactivate account</Dialog.Title>
<Dialog.Description>This will permanently deactivate your account</Dialog.Description>
<p>
Are you sure you want to deactivate your account? All of your data will be permanently
removed. This action cannot be undone.
</p>
<button onClick={() => setShowForm(false)}>Deactivate</button>
<button onClick={() => setShowForm(false)}>Cancel</button>
</Dialog>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
How to get rid of undefined error when closing a dialog box?
When you close your dialog, you don't pass anything to the close function, therefore the contractors value will be undefined in your ...
Read more >When opening a page for edit a dialog with an undefined error ...
When opening a page for edit a dialog with an undefined error is displayed. There is a 404 error in the browser's console....
Read more >Dialog plugin got undefined refs when using async component
Describe the bug Using async component in dialog custom component this.$q.dialog({ component: () => import('./async-comp.vue'), parent: this } ...
Read more >Script Error dialog on sign in with 'Promise' is undefined error ...
Error : 'Promise' is undefined. Screenshot of script error dialog. Otherwise, a "Connection Failure" message displays but never completes.
Read more >"'fileName' is undefined" error when you open the printer Help ...
Fixes an issue that occurs when you try to open the printer Help file from the Printer Properties dialog box. This issue occurs...
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
I got the same problem
@ChristoRibeiro make it a pinned version like
"@headlessui/react": "0.3.1-d519f7d"
(without the caret). Also nuke your node_modules just in case! See this reply: https://github.com/tailwindlabs/headlessui/issues/269#issuecomment-791333952