From 040d965b1aa8b17c7882c4aa45f2872cea380896 Mon Sep 17 00:00:00 2001 From: Yomguithereal Date: Mon, 23 Jan 2017 16:31:20 +0100 Subject: [PATCH] Fixing issue with filters reset. Refs #259 --- client/src/app/data-table/data-table.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/app/data-table/data-table.component.ts b/client/src/app/data-table/data-table.component.ts index 939c65ef..b72592de 100644 --- a/client/src/app/data-table/data-table.component.ts +++ b/client/src/app/data-table/data-table.component.ts @@ -57,7 +57,10 @@ export class DataTableComponent implements OnInit, OnChanges { ngOnChanges(changes: SimpleChanges) { let navigateToFirstPage = false; if (changes['cols'] && this.cols && this.cols.length) { - // @TODO : destroy old filters ? + + // Resetting filters + this.filters = {}; + this.cols = this.cols.map(col => { let filterControl = new FormControl(''); filterControl.valueChanges.subscribe(value => {