Swapping content in the portal closes it
See original GitHub issueBug Report
Describe the Bug
When you swap content in a portal, the portal closes.
How to Reproduce
- Create a portal with a button in it. This button should be replaced when another content when clicked.
- Click on the button, the portal closes.
CodeSandbox Link
https://codesandbox.io/s/focused-wing-xsyqq
Expected Behavior
The portal should stay opened.
Your Environment
- OS: macOS
- Browser: Chrome
- Version of react-cool-portal: v1.0.20
Additional Information
I tracked down the issue, the problem is here. When this code is executed, the content is already replaced so the condition returns true
.
I found a workaround with a setTimeout
(shown in the CodeSandbox) but I think this should be solved in the library side.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
RHEL 8: Premature swapping with swappiness=0 while there ...
Even if memory is under pressure with swappiness=0, the inactive pagecache is swapped out instead of being reclaimed.
Read more >Article - Swapping a Class - TeamDynamix
You can swap a class in your schedule if you have enrolled in one section and ... This is helpful when a previously...
Read more >Failed to swap slots for Azure Web App - Error
This issue is read only, because it has been in the Closed - Fixed state for over 90 ... Swapping manually in Azure...
Read more >Set up staging environments - Azure App Service
On your app's resource page in the portal, in the left pane, select Activity log. A swap operation appears in the log query...
Read more >Drop or Swap Classes | California State University, Northridge
This guide explains how to drop and/or swap classes. ... CSUN Portal home page, Top Tools and right panel with Enroll in Classes...
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 FreeTop 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
Top GitHub Comments
@Kerumen This issue should be fixed in v1.0.22.
@wellyshen Perfect this works like a charm!