fix(segment): only emit ionChange when user releases pointer from screen (#20495)

fixes #20500
fixes #20257
This commit is contained in:
Liam DeBeasi
2020-02-18 15:11:28 -05:00
committed by GitHub
parent 7a461c59c5
commit 4d50064764
5 changed files with 38 additions and 10 deletions

View File

@ -12,6 +12,13 @@ export class ValueAccessor implements ControlValueAccessor {
constructor(protected el: ElementRef) {}
writeValue(value: any) {
/**
* TODO for Ionic 6:
* Change `value == null ? '' : value;`
* to `value`. This was a fix for IE9, but IE9
* is no longer supported; however, this change
* is potentially a breaking change
*/
this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
setIonicClasses(this.el);
}