playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
662 stars 61 forks source link

Panel Header is duplicated when using components in react app #358

Open yorschor opened 2 weeks ago

yorschor commented 2 weeks ago

I noticed this while playing around with PCUI in a NextJS app. The following code export default function App() { return ( <Panel headerText="Foo Basadsadfr" collapsible collapseHorizontally resizable="right" width={150} resizeMin={150} resizeMax={300}/> ) } results in this on my side image

I assume this is perhaps due to how react manages the lifetime? Its working fin in the current example so I assumed that its a react specific.

marklundin commented 2 weeks ago

Yep, this looks like a valid issue. Repro https://stackblitz.com/edit/vitejs-vite-vrt9bt?file=src%2FApp.tsx