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
I am running into a similar issue as the one linked above, in which the reflex container is rendering with the splitter completely to one side and unabled to be dragged, no content rendered in either pane, and with the styles of both the left and right panes being set to flex: 0 1 0%.
Here is a screenshot of this behavior:
I was able to narrow down the problem in my app to the fact that I am rendering the ReflexContainer inside of a <Suspense> component, and that Suspense is being triggered by a sibling component that makes a suspense query through react-query.
It seems that in this situation, the tries to render itself while actively being hidden by , which cases it to hit the Found ReflexContainer with width=0, this will cause invalid behavior... error, messing up its rendering.
@leefsmp I have put together a simple example of this behavior here: https://github.com/lmossman/reflex-example
To reproduce this behavior, simply clone that repo and run npm install && npm start, which will start a development server on localhost:3000 that demonstrates the above behavior.
Note that if you remove the <Suspense> and <QueryComponent> from the the App.jsx in that example, it properly renders the reflex container with a draggable splitter, which shows that the is what is causing this issue.
The text was updated successfully, but these errors were encountered:
And upgrading my example repo to React 18 solves the issue. So for anyone else running into this, try upgrading to React 18 to solve it!
Another workaround is to not have a sibling component that causes the Suspense to fire, but instead wrap the ReflexContainer as a child of the suspending component
Related issue: #27
I am running into a similar issue as the one linked above, in which the reflex container is rendering with the splitter completely to one side and unabled to be dragged, no content rendered in either pane, and with the styles of both the left and right panes being set to
flex: 0 1 0%
.Here is a screenshot of this behavior:
![Screenshot 2023-06-15 at 5 11 23 PM](https://private-user-images.githubusercontent.com/22731524/246279653-c1aa8d9b-c155-490d-ad4e-fba210af7c9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MjQyMzcsIm5iZiI6MTcxOTYyMzkzNywicGF0aCI6Ii8yMjczMTUyNC8yNDYyNzk2NTMtYzFhYThkOWItYzE1NS00OTBkLWFkNGUtZmJhMjEwYWY3YzliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDAxMTg1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5YzM1MTFiMzcyMjU3Yzk5NjY3M2ZiZjIwMWE2NWUwNTY3MGMyNGYzMjM0ZTUyZGUxZmI1YjgxZGY5ZDMzZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9RvEDQDsIn8nOxtovbghuYRw1VNitUtn9o1M8cmbP-c)
I was able to narrow down the problem in my app to the fact that I am rendering the ReflexContainer inside of a
<Suspense>
component, and that Suspense is being triggered by a sibling component that makes a suspense query through react-query.It seems that in this situation, the tries to render itself while actively being hidden by , which cases it to hit the
Found ReflexContainer with width=0, this will cause invalid behavior...
error, messing up its rendering.@leefsmp I have put together a simple example of this behavior here: https://github.com/lmossman/reflex-example
To reproduce this behavior, simply clone that repo and run
npm install && npm start
, which will start a development server onlocalhost:3000
that demonstrates the above behavior.Note that if you remove the
<Suspense>
and<QueryComponent>
from the the App.jsx in that example, it properly renders the reflex container with a draggable splitter, which shows that the is what is causing this issue.The text was updated successfully, but these errors were encountered: