Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into rename-igxInput-class
  • Loading branch information
ddincheva committed Feb 7, 2018
2 parents 9200452 + 8f7fe31 commit d8b227d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
1.1. Adding component views like App Host, Tabs, List
1.2. Updating the default project look
1.3. Move the project navigation inside an App Host
2. Product Themening
2. Product Theming
3. Grid Multi-column Headers [issue](https://github.com/IgniteUI/igniteui-angular/issues/488)
4. Collapsible Column Groups with state templating (collapsed state column can be templated)
5. Column pinning
Expand Down
21 changes: 20 additions & 1 deletion src/grid/grid.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { DOCUMENT } from "@angular/common";
import {
AfterContentInit,
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Expand All @@ -8,8 +10,10 @@ import {
ComponentRef,
ContentChild,
ContentChildren,
ElementRef,
EventEmitter,
HostBinding,
Inject,
Input,
OnInit,
Output,
Expand Down Expand Up @@ -40,7 +44,7 @@ let NEXT_ID = 0;
styleUrls: ["./grid.component.scss"],
templateUrl: "./grid.component.html"
})
export class IgxGridComponent implements OnInit, AfterContentInit {
export class IgxGridComponent implements OnInit, AfterContentInit, AfterViewInit {

@Input()
public data = [];
Expand Down Expand Up @@ -186,6 +190,8 @@ export class IgxGridComponent implements OnInit, AfterContentInit {

constructor(
private gridAPI: IgxGridAPIService,
private elementRef: ElementRef,
@Inject(DOCUMENT) private document,
public cdr: ChangeDetectorRef,
private resolver: ComponentFactoryResolver,
private viewRef: ViewContainerRef) {
Expand All @@ -207,6 +213,19 @@ export class IgxGridComponent implements OnInit, AfterContentInit {
this._columns = this.columnList.toArray();
}

public ngAfterViewInit() {
setTimeout(() => {
const computed = this.document.defaultView.getComputedStyle(this.nativeElement);
this.width = computed.getPropertyValue("width");
this.height = computed.getPropertyValue("height");
this.markForCheck();
});
}

get nativeElement() {
return this.elementRef.nativeElement;
}

get columns(): IgxColumnComponent[] {
return this._columns;
}
Expand Down

0 comments on commit d8b227d

Please sign in to comment.