Skip to content

Panel minSize using pixels behaves as percentage on window resize #720

Description

@JJ8443

Hi, pleasantly surprised to see 0 open issues on a popular github repo, congrats!

Swapped over from very old package handling resize by pixels. My issue is, If I have a panel set to a minSize of say 100px, I then shrink my browser down to very small, the panel will keep to 100px. However when I then maximise my browser it will scale my panel up as a percentage of what it was when the browser was smaller.

This can be seen on your demo also: https://react-resizable-panels.vercel.app/examples/min-max-sizes

Set Left to 100px, shrink browser window and then maximise, the pixels increase.

Playing with it further it seems like all resizing works on percentages. If in a smaller window i set my panel to my max width, then maximise, it retains max width however I minimise again and it shrinks relative to browser size.

Desired behaviour:
Think it would be fine for everything to stay as is as it doesn't necessarily break UI flow but the minsize upon resize to any size should retain its min pixel size.

Using latest version: 4.11.2

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions