mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#101 datatable demo project
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect"
|
||||
(click)="reset()">
|
||||
Reset to default
|
||||
</button>
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect"
|
||||
(click)="addRow()">
|
||||
|
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
import {
|
||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
||||
ObjectDataTableAdapter,
|
||||
@@ -31,8 +30,7 @@ declare let __moduleName: string;
|
||||
moduleId: __moduleName,
|
||||
selector: 'datatable-demo',
|
||||
templateUrl: './datatable-demo.component.html',
|
||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES],
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES]
|
||||
})
|
||||
export class DataTableDemoComponent {
|
||||
|
||||
@@ -46,6 +44,10 @@ export class DataTableDemoComponent {
|
||||
};
|
||||
|
||||
constructor() {
|
||||
this.reset();
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.data = new ObjectDataTableAdapter(
|
||||
[
|
||||
{id: 1, name: 'Name 1', createdBy: this._createdBy, icon: 'material-icons://folder_open'},
|
||||
|
Reference in New Issue
Block a user