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

(fix) Panel isn't resizing after content has changed #454

Closed
wants to merge 2 commits into from
Closed
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
11 changes: 3 additions & 8 deletions components/collapse/collapse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ export class Collapse implements OnInit {
return this.isExpanded;
}

private _ab:AnimationBuilder;
private _el:ElementRef;

public constructor(_ab:AnimationBuilder, _el:ElementRef) {
this._ab = _ab;
this._el = _el;

public constructor(private _ab:AnimationBuilder, private _el:ElementRef, private _renderer: Renderer) {

This comment was marked as off-topic.

}

public ngOnInit():void {
Expand Down Expand Up @@ -120,7 +114,8 @@ export class Collapse implements OnInit {
.onComplete(() => {
this.isCollapse = true;
this.isCollapsing = false;
this._el.nativeElement.style.overflow = 'visible';
this._renderer.setElementStyle(this._el.nativeElement, 'overflow', 'visible');
this._renderer.setElementStyle(this._el.nativeElement, 'height', 'auto');
});
}, 4);
}
Expand Down