diff --git a/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts b/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts index e68bfbc9..496fc879 100644 --- a/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts +++ b/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts @@ -62,6 +62,9 @@ export class NgxIntlTelInputComponent implements OnInit, OnChanges { @Input() phoneValidation = true; @Input() inputId = 'phone'; @Input() separateDialCode = false; + @Input() scrollAnimationBehavior: 'auto'|'instant'|'smooth' = 'smooth'; + @Input() scrollAnimationBlock: 'start'|'center'|'end'|'nearest' = 'nearest'; + @Input() scrollAnimationInline: 'start'|'center'|'end'|'nearest' = 'nearest'; separateDialCodeClass: string; @Output() readonly countryChange = new EventEmitter(); @@ -200,9 +203,9 @@ export class NgxIntlTelInputComponent implements OnInit, OnChanges { ); if (el) { el.scrollIntoView({ - behavior: 'smooth', - block: 'nearest', - inline: 'nearest', + behavior: this.scrollAnimationBehavior, + block: this.scrollAnimationBlock, + inline: this.scrollAnimationInline, }); } }