Skip to content

Commit

Permalink
Merge pull request #239 from IgniteUI/dpetev/igx-custom-grid
Browse files Browse the repository at this point in the history
feat(igniteui-angular): add custom grid template with selectable features
  • Loading branch information
bazal4o authored Apr 20, 2018
2 parents c21d67a + 47c54cc commit 258efc5
Show file tree
Hide file tree
Showing 10 changed files with 521 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
.igx-paginator {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
align-content: center;
margin: 1rem auto;
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { $(ClassName)Component } from './$(filePrefix).component';
import { IgxGridModule, IgxProgressBarModule, IgxAvatarModule, IgxBadgeModule, IgxSwitchModule } from 'igniteui-angular/main';
import { IgxGridModule } from 'igniteui-angular/main';

describe('$(ClassName)Component', () => {
let component: $(ClassName)Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { employeesData } from './localData';
@Component({
selector: 'app-$(filePrefix)',
templateUrl: './$(filePrefix).component.html',
styleUrls: ['./$(filePrefix).component.css'],
encapsulation: ViewEncapsulation.None
styleUrls: ['./$(filePrefix).component.css']
})
export class $(ClassName)Component implements OnInit {
public localData: any[];
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div>
<p>$(description)</p>
<p>Active features: $(selectedFeatures)</p>
<igx-grid #grid1 [data]="localData" height="700px" $(gridFeatures)>
<igx-column field="FirstName" header="First Name" width="200px" $(columnFeatures) $(columnPinning) $(summaryColumn)>
</igx-column>
<igx-column field="LastName" header="Last Name" width="200px" $(columnFeatures) $(columnPinning)>
</igx-column>
<igx-column field="Country" width="200px" $(columnFeatures) $(summaryColumn)>
</igx-column>
<igx-column field="Age" width="110px" dataType="number" $(columnFeatures) $(summaryColumn)>
</igx-column>
<igx-column field="RegistererDate" header="Registerer Date" width="200px" dataType="date" $(columnFeatures)>
<ng-template igxCell let-value>
{{ value | date }}
</ng-template>$(datePickerEditor)
</igx-column>
<igx-column field="IsActive" header="Is Active" width="100px" dataType="boolean" $(columnBoolFeatures)>
<ng-template igxCell let-cell="cell">
<igx-checkbox $(checkBoxBind)></igx-checkbox>
</ng-template>
</igx-column>
</igx-grid>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { $(ClassName)Component } from './$(filePrefix).component';
import { IgxGridModule, IgxDatePickerModule, IgxCheckboxModule } from 'igniteui-angular/main';

describe('$(ClassName)Component', () => {
let component: $(ClassName)Component;
let fixture: ComponentFixture<$(ClassName)Component>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ $(ClassName)Component ],
imports: [ FormsModule, BrowserAnimationsModule, IgxGridModule, IgxDatePickerModule, IgxCheckboxModule ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent($(ClassName)Component);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { employeesData } from './localData';

@Component({
selector: 'app-$(filePrefix)',
templateUrl: './$(filePrefix).component.html',
styleUrls: ['./$(filePrefix).component.css'],
encapsulation: ViewEncapsulation.None
})
export class $(ClassName)Component implements OnInit {
public localData: any[];
title = '$(name)';
constructor() { }

ngOnInit() {
this.localData = employeesData;
}
}
Loading

0 comments on commit 258efc5

Please sign in to comment.