Skip to content

Commit

Permalink
Merge branch 'mik-laj-patch-1' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Apr 26, 2016
2 parents a177e1e + 914ae1a commit 19dd0a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/collapse/collapse.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Directive, OnInit, ElementRef, Input, HostBinding} from 'angular2/core';
import {Directive, OnInit, ElementRef, Input, HostBinding, Renderer} from 'angular2/core';
import {AnimationBuilder} from 'angular2/src/animate/animation_builder';
// fix: replace with // 'angular2/animate';
// when https://github.com/angular/angular/issues/5984 will be fixed
Expand Down Expand Up @@ -42,11 +42,12 @@ export class Collapse implements OnInit {

private _ab:AnimationBuilder;
private _el:ElementRef;
private _renderer:Renderer;

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

this._renderer = _renderer;
}

public ngOnInit():void {
Expand Down Expand Up @@ -120,7 +121,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

0 comments on commit 19dd0a5

Please sign in to comment.