Skip to content
Snippets Groups Projects
Commit 5bcb361c authored by Giuseppe Digilio's avatar Giuseppe Digilio
Browse files

Fixed issue with model value update within scrollable fields

parent 3651b16b
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } fro
import { FormGroup } from '@angular/forms';
import { Observable, of as observableOf } from 'rxjs';
import { catchError, first, tap } from 'rxjs/operators';
import { catchError, distinctUntilChanged, first, tap } from 'rxjs/operators';
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
import {
DynamicFormControlComponent,
......@@ -71,7 +71,13 @@ export class DsDynamicScrollableDropdownComponent extends DynamicFormControlComp
}
this.pageInfo = object.pageInfo;
this.cdr.detectChanges();
})
});
this.group.get(this.model.id).valueChanges.pipe(distinctUntilChanged())
.subscribe((value) => {
this.setCurrentValue(value);
});
}
inputFormatter = (x: AuthorityValue): string => x.display || x.value;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment