Dragging resize handle to collapse and expand panel does not behave as expected #269
              
  
  Closed
              
          
                  
                    
                      imaricodes
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 2 replies
-
| The behavior you describe here is intentional and matches VS Code's UX: Kapture.2024-01-19.at.10.15.16.mp4
 For example, the handle can't move so long as the panel is collapsed, without visibly "detaching" from the panel (which I think would make most UIs look broken). | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I am using react-resizable-panels": "^1.0.9" via shadcn ui in a Nextjs 14 application.
I have two panels in a horizontal group. The right panel collapses when I drag the resize handle to the right past the minSize as expected. The collapsed panel also expands as expected when I drag the resize handle to the left.
The issue is that the collapsed panel does not expand until the resizeHandle is dragged back to (what I think) is the minSize set for the collapsed panel. For a while, this made me think the resize handle was not working.
I expected the collapsed panel to begin expanding as soon as I start dragging the resize handle. However, nothing visible happens as I drag left. The resize handle does not move at all. When I reach a certain point, the collapsed panel suddenly expands to full size and the resize handle jumps to where my pointer is. I tried adjusting the collapsedSize prop value using 0 and other values, as well as the minSize prop with no change in behavior.
This behavior seems that it would be confusing to a user. Is there some prop I've missed to change this behavior?
I noticed this same behavior in this example:https://react-resizable-panels.vercel.app/examples/collapsible
Here's my code:
Beta Was this translation helpful? Give feedback.
All reactions