From cb00e1b6641ae9c543c3a12d2fd50142d8808f2f Mon Sep 17 00:00:00 2001 From: Matthew Kendrick Co Date: Thu, 10 May 2018 02:41:04 +0800 Subject: [PATCH] docs(table): fix example not correctly changing pages when filtering (#11119) --- src/material-examples/table-overview/table-overview-example.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/material-examples/table-overview/table-overview-example.ts b/src/material-examples/table-overview/table-overview-example.ts index 4d807e2d0b0..7a5a00136f3 100644 --- a/src/material-examples/table-overview/table-overview-example.ts +++ b/src/material-examples/table-overview/table-overview-example.ts @@ -34,6 +34,9 @@ export class TableOverviewExample { filterValue = filterValue.trim(); // Remove whitespace filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches this.dataSource.filter = filterValue; + if (this.dataSource.paginator) { + this.dataSource.paginator.firstPage(); + } } }