From: Tiago Melo Date: Wed, 8 May 2019 15:50:36 +0000 (+0000) Subject: mgr/dashboard: Reduce number of triggers when search not empty X-Git-Tag: v15.1.0~2621^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28118%2Fhead;p=ceph.git mgr/dashboard: Reduce number of triggers when search not empty Fixes: http://tracker.ceph.com/issues/39944 Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index 8d6295f3b427..9539aa95550c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -404,9 +404,10 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O if (!this.data) { return; // Wait for data } - this.rows = [...this.data]; if (this.search.length > 0) { this.updateFilter(); + } else { + this.rows = [...this.data]; } this.reset(); this.updateSelected();