You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Opening and closing new windows doesn't work properly when nested inside another window
To Reproduce
Run the following example code
importReact,{useState}from"react";import{Renderer,Window,View,Button,Text}from"@nodegui/react-nodegui";functionMainWindow(){const[open1,setOpen1]=useState(false);const[open2,setOpen2]=useState(false);const[open3,setOpen3]=useState(false);return(<><WindowwindowTitle="Main window"><View><Buttontext="Nested in view"on={{clicked: ()=>setOpen1(!open1)}}/><Buttontext="Nested in window"on={{clicked: ()=>setOpen2(!open2)}}/><Buttontext="Not nested"on={{clicked: ()=>setOpen3(!open3)}}/>{open1&&<Dialogtext="Nested in view"/>}{/* Does not work */}</View>{open2&&<Dialogtext="Nested in window"/>}{/* Partialy working */}</Window>{open3&&<Dialogtext="Not nested"/>}{/* This works */}</>);}functionDialog({text}: {text: string}){return(<WindowwindowTitle={text}><View><Text>{text}</Text></View></Window>)}Renderer.render(<MainWindow/>);
Expected behavior
That windows can be open and closed no matter where they are placed in the react tree.
Desktop (please complete the following information):
OS: Linux
NodeGUI version: 0.12.1
React NodeGUI version: 0.4.0
OS Version: Arch Linux
The text was updated successfully, but these errors were encountered:
Describe the bug
Opening and closing new windows doesn't work properly when nested inside another window
To Reproduce
Run the following example code
Expected behavior
That windows can be open and closed no matter where they are placed in the react tree.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: