Comments (9)
Or, add a setSize method to the
Panel
API so that I can set the size of this specific panel.
This already exists (resize
). You can check out the other imperative methods here:
https://react-resizable-panels.vercel.app/examples/imperative-panel-api
from react-resizable-panels.
It may be worth clarifying that I intentionally decided not to support pixel sizes. If the library has bugs, I'll try to fix them, but if it's something that only happens due to trying to add pixel size constraints on top of the system, then I think that falls outside of the scope of what I can reasonably maintain as a side project (especially given that I don't need/use pixel constraints).
from react-resizable-panels.
Oh I missed there was a resize method, I was looking for a setSize given there's a getSize. Also the onCollapse signature on the docs page is out of date.
from react-resizable-panels.
Oh I missed there was a resize method, I was looking for a setSize given there's a getSize.
The API is called resize
.
It sounds like maybe this is a bug that should be fixed though, regardless of pixels vs percentage, so I'll leave it open.
Also the onCollapse signature on the docs page is out of date.
I don't think this is mentioned on the docs. I see you meant the README
. I thought you meant the website.
That's also unrelated to the issue we're discussing though, so let's preferably keep this focused to one thing. (It's hard to track otherwise.)
Preferably just send a PR for docs mistakes ;)
from react-resizable-panels.
I believe 0a410c8 should fix what I would consider an edge case bug with non-pixel usage (but one you'll need for pixel stuff to work). Hope it helps!
from react-resizable-panels.
Released in [email protected]
❤️ → ☕ givebrian.coffee
from react-resizable-panels.
Thanks, this seems to work. I don't have to call resize
anymore. Although one issue I noticed is that when you resize the window it randomly loses the collapsed state. I thought I had a way to call collapse()
again based on my duplicate state boolean but that doesn't fix it. It happens no matter how you resize so it's not like the area becomes larger than the collapseSize threshold or anything. Something is causing collapsed state to be lost in the library and it auto-expands.
from react-resizable-panels.
Should I file a new issue for the collapse state bug?
from react-resizable-panels.
If you're able to submit a bug report with a full repro, I'll take a look.
from react-resizable-panels.
Related Issues (20)
- Example for fixing SSR flicker in NextJS page router HOT 7
- How to change minimum size to collapse the panel HOT 4
- [Example]: Conditional and Collapsible Panels HOT 11
- Can I use conditional rendering with imperative group panel API? HOT 4
- feature request: typed external storage API HOT 1
- onDragging to much calls HOT 3
- Z Index issues HOT 3
- panel seems to get clipped when dragging up HOT 6
- Resizing panel doesn't set the new resize state until clicking on the resize handle (v2.0.0+) HOT 3
- UseLayoutEffect on PanelResizeHandle.ts (SSR) HOT 2
- Tiny layout shift (SSR) HOT 1
- Drag gets priority over overlapping elements HOT 7
- data-panel-size did not match. Server: "null" Client: number HOT 12
- Error: "Failed to execute 'getComputedStyle' on 'Window'" HOT 3
- [Enhancement] Provide "null" storage to avoid persistence in localstorage HOT 1
- Assertion Failed on conditionally rendered panels with size constraints HOT 7
- [FEAT] Snap Points: Predefined sizes to get snapped to. HOT 1
- Panel becomes unresizable after a certain vertical position in the page HOT 4
- PanelGroup different height with collapsed children HOT 2
- Global cursor style persists if PanelResizeHandle is disabled while dragging HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-resizable-panels.