Formatting
This commit is contained in:
parent
2f34aedce5
commit
51f1967fb2
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "ng-datatable",
|
"name": "@ztimson/ng-datatable",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {FormsModule} from "@angular/forms";
|
import {FormsModule} from '@angular/forms';
|
||||||
import {BrowserModule} from "@angular/platform-browser";
|
import {BrowserModule} from '@angular/platform-browser';
|
||||||
|
|
||||||
import {NgDatatableComponent} from './ng-datatable.component';
|
import {NgDatatableComponent} from './ng-datatable.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [BrowserModule, FormsModule],
|
||||||
BrowserModule,
|
|
||||||
FormsModule,
|
|
||||||
],
|
|
||||||
declarations: [NgDatatableComponent],
|
declarations: [NgDatatableComponent],
|
||||||
exports: [NgDatatableComponent]
|
exports: [NgDatatableComponent]
|
||||||
})
|
})
|
||||||
export class NgDatatableModule { }
|
export class NgDatatableModule {}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export * from './lib/column'
|
export * from './lib/column'
|
||||||
export * from './lib/ng-dataTable.component';
|
export * from './lib/ng-datatable.component';
|
||||||
export * from './lib/ng-dataTable.module';
|
export * from './lib/ng-datatable.module';
|
||||||
|
@ -1,24 +1,19 @@
|
|||||||
Table CSS <input [(ngModel)]="tableCSS">
|
Table CSS
|
||||||
Selection Mode <select [(ngModel)]="selectionMode">
|
<input [(ngModel)]="tableCSS"> Selection Mode
|
||||||
|
<select [(ngModel)]="selectionMode">
|
||||||
<option>None</option>
|
<option>None</option>
|
||||||
<option>single</option>
|
<option>single</option>
|
||||||
<option>multi</option>
|
<option>multi</option>
|
||||||
</select>
|
</select>
|
||||||
Checkbox <input type="checkbox" [(ngModel)]="checkbox">
|
Checkbox
|
||||||
Expandable <input type="checkbox" [(ngModel)]="expandable">
|
<input type="checkbox" [(ngModel)]="checkbox"> Expandable
|
||||||
<br><br>
|
<input type="checkbox" [(ngModel)]="expandable">
|
||||||
<input placeholder="Search" (keyup)="search.next($event.target.value)">
|
|
||||||
<br>
|
<br>
|
||||||
Selected: {{table.selectedRows.size}}/{{table.processedData.length}}
|
<br>
|
||||||
<ng-datatable #table
|
<input placeholder="Search" (keyup)="search.next($event.target.value)">
|
||||||
[cssClass]="tableCSS"
|
<br> Selected: {{table.selectedRows.size}}/{{table.processedData.length}}
|
||||||
[columns]="columns"
|
<ng-datatable #table [cssClass]="tableCSS" [columns]="columns" [data]="data" [expandedTemplate]="expandable ? expanded : null"
|
||||||
[data]="data"
|
[showCheckbox]="checkbox" [paginate]="false" [selectionMode]="selectionMode == 'None' ? null : selectionMode" (rowSelected)="log($event)">
|
||||||
[expandedTemplate]="expandable ? expanded : null"
|
|
||||||
[showCheckbox]="checkbox"
|
|
||||||
[paginate]="false"
|
|
||||||
[selectionMode]="selectionMode == 'None' ? null : selectionMode"
|
|
||||||
(rowSelected)="log($event)">
|
|
||||||
<ng-template #expanded let-object="object">
|
<ng-template #expanded let-object="object">
|
||||||
Hello {{object.firstName}} {{object.lastName}}, How are you today?
|
Hello {{object.firstName}} {{object.lastName}}, How are you today?
|
||||||
<span *ngIf="object.age < 18">I can see that you are under age.</span>
|
<span *ngIf="object.age < 18">I can see that you are under age.</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user