mirror of
https://github.com/dergigi/boris.git
synced 2026-01-17 22:04:32 +01:00
fix: force React to remount tab content when switching tabs
- Add key prop based on activeTab to wrapper div - Forces complete unmount/remount of content when switching tabs - Prevents DOM element reuse that was causing blog posts to bleed into highlights tab
This commit is contained in:
@@ -487,7 +487,9 @@ const Explore: React.FC<ExploreProps> = ({ relayPool, eventStore, settings, acti
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{renderTabContent()}
|
||||
<div key={activeTab}>
|
||||
{renderTabContent()}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user