From 306e8377c97772559dfa7db39aee800e47607064 Mon Sep 17 00:00:00 2001 From: "adel.ka" Date: Mon, 27 Oct 2025 11:12:34 +0300 Subject: [PATCH] =?UTF-8?q?SUPPORT-9513:=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=20=D0=BC=D0=BD=D0=BE?= =?UTF-8?q?=D0=B6=D0=B5=D1=81=D1=82=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ts/ervu/component/grid/filter/SetFilter.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/ervu/component/grid/filter/SetFilter.ts b/frontend/src/ts/ervu/component/grid/filter/SetFilter.ts index 0a439e24..acb458f8 100644 --- a/frontend/src/ts/ervu/component/grid/filter/SetFilter.ts +++ b/frontend/src/ts/ervu/component/grid/filter/SetFilter.ts @@ -24,8 +24,12 @@ export class SetFilter implements IFilterComp { this.selectAll = this.initCheckBox('selectAll', 'Все', index); this.checkboxes.push(this.selectAll); - params.api.getRenderedNodes() - .map(node => node.data[params.colDef.field]) + const allValues: any[] = []; + params.api.forEachNode((node) => { + allValues.push(node.data[params.colDef.field]); + }); + + allValues .sort((n1, n2) => n1 > n2 ? 1 : n1 < n2 ? -1 : 0) .forEach(value => { if (this.values.includes(value)) { @@ -36,7 +40,8 @@ export class SetFilter implements IFilterComp { let checkbox = this.initCheckBox(id, value, index); this.checkboxes.push(checkbox); this.values.push(value); - }); + }); + this.initialValues = this.values.slice(); this.filterParams = params; this.filterActive = false;