-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from IgniteUI/dpetev/igx-custom-grid
feat(igniteui-angular): add custom grid template with selectable features
- Loading branch information
Showing
10 changed files
with
521 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%; | ||
} | ||
2 changes: 1 addition & 1 deletion
2
templates/angular/igx-ts/grid/default/files/src/app/__path__/__name__.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
24 changes: 24 additions & 0 deletions
24
templates/angular/igx-ts/grid/grid-custom/files/src/app/__path__/__name__.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
28 changes: 28 additions & 0 deletions
28
templates/angular/igx-ts/grid/grid-custom/files/src/app/__path__/__name__.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
templates/angular/igx-ts/grid/grid-custom/files/src/app/__path__/__name__.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.