Merge remote-tracking branch 'origin/feature/SUPPORT-9513_fix_set_filter' into develop
This commit is contained in:
commit
62e3a68553
1 changed files with 8 additions and 3 deletions
|
|
@ -24,8 +24,12 @@ export class SetFilter implements IFilterComp {
|
||||||
this.selectAll = this.initCheckBox('selectAll', 'Все', index);
|
this.selectAll = this.initCheckBox('selectAll', 'Все', index);
|
||||||
this.checkboxes.push(this.selectAll);
|
this.checkboxes.push(this.selectAll);
|
||||||
|
|
||||||
params.api.getRenderedNodes()
|
const allValues: any[] = [];
|
||||||
.map(node => node.data[params.colDef.field])
|
params.api.forEachNode((node) => {
|
||||||
|
allValues.push(node.data[params.colDef.field]);
|
||||||
|
});
|
||||||
|
|
||||||
|
allValues
|
||||||
.sort((n1, n2) => n1 > n2 ? 1 : n1 < n2 ? -1 : 0)
|
.sort((n1, n2) => n1 > n2 ? 1 : n1 < n2 ? -1 : 0)
|
||||||
.forEach(value => {
|
.forEach(value => {
|
||||||
if (this.values.includes(value)) {
|
if (this.values.includes(value)) {
|
||||||
|
|
@ -36,7 +40,8 @@ export class SetFilter implements IFilterComp {
|
||||||
let checkbox = this.initCheckBox(id, value, index);
|
let checkbox = this.initCheckBox(id, value, index);
|
||||||
this.checkboxes.push(checkbox);
|
this.checkboxes.push(checkbox);
|
||||||
this.values.push(value);
|
this.values.push(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.initialValues = this.values.slice();
|
this.initialValues = this.values.slice();
|
||||||
this.filterParams = params;
|
this.filterParams = params;
|
||||||
this.filterActive = false;
|
this.filterActive = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue