Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize sidebars only while opened #1060

Merged
merged 1 commit into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

## Fixed
- Fixed text rendering issue resulting in clipping of property name and types in the header of the browser window. It was only observed on Windows with high pixel density displays. ([#1059](https://github.com/realm/realm-studio/pull/1059), since v1.0.0)
- Fixed an issue where sidebars got resized when a window got resized despite the sidebar being collapsed. ([#1060](https://github.com/realm/realm-studio/pull/1060), since v2.7.0)

## Internals
- Fixed the Dockerfile used when testing PRs. ([#1057](https://github.com/realm/realm-studio/pull/1057))
Expand Down
2 changes: 1 addition & 1 deletion src/ui/reusable/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class SidebarContainer extends React.Component<

private onWindowResize = (e: Event) => {
// When a window got resized, the width of the sidebar might have been reduced
if (this.outerElement) {
if (this.outerElement && this.props.isOpen) {
const rect = this.outerElement.getBoundingClientRect();
// The window was resized to a point where the Sidebar could no longer maintain its width
if (rect.width < this.state.width) {
Expand Down