From 5a53967d97a4930c9302ba8e89155ab42ec012f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Solli?= Date: Mon, 7 Aug 2017 16:08:23 +0200 Subject: [PATCH] Added valueChange event to datatable Issue #3593 --- src/app/components/datatable/datatable.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/components/datatable/datatable.ts b/src/app/components/datatable/datatable.ts index d59b81cc207..c85a50720d8 100644 --- a/src/app/components/datatable/datatable.ts +++ b/src/app/components/datatable/datatable.ts @@ -1,4 +1,4 @@ -import {NgModule, Component, ElementRef, AfterContentInit, AfterViewInit, AfterViewChecked, OnInit, OnDestroy, Input, +import {NgModule, Component, ElementRef, AfterContentInit, AfterViewInit, AfterViewChecked, OnInit, OnDestroy, Input, ViewContainerRef, ViewChild, IterableDiffers, Output, EventEmitter, ContentChild, ContentChildren, Renderer2, QueryList, TemplateRef, ChangeDetectorRef, Inject, forwardRef, EmbeddedViewRef, NgZone @@ -617,6 +617,8 @@ export class DataTable implements AfterViewChecked,AfterViewInit,AfterContentIni @Input() loadingIcon: string = 'fa-circle-o-notch'; + @Output() valueChange: EventEmitter = new EventEmitter(); + @Output() firstChange: EventEmitter = new EventEmitter(); @Output() onRowExpand: EventEmitter = new EventEmitter(); @@ -810,6 +812,7 @@ export class DataTable implements AfterViewChecked,AfterViewInit,AfterContentIni else { this._value = val; } + this.valueChange.emit(this.value); } @Input() get first(): number {