From 62f7feaa825d7b5ea525ba5b973d33f378e10750 Mon Sep 17 00:00:00 2001 From: Titou74 Date: Fri, 6 Jan 2023 11:46:18 +0100 Subject: [PATCH 1/3] - Add 3 inputs to change the scroll animation parameters --- .../src/lib/ngx-intl-tel-input.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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, }); } } From c3e52b16a3ba1dd33a23e6c69999a883cc9f5342 Mon Sep 17 00:00:00 2001 From: Titou74 Date: Fri, 6 Jan 2023 14:22:27 +0100 Subject: [PATCH 2/3] - Change package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81e10693..85724eac 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ngx-intl-tel-input-app", + "name": "vialala-ngx-intl-tel-input-app", "version": "0.0.0", "scripts": { "ng": "ng", From 98b1dd7f0a2a15f8f2d18a08e1b46027fd758234 Mon Sep 17 00:00:00 2001 From: Titou74 Date: Fri, 6 Jan 2023 14:37:18 +0100 Subject: [PATCH 3/3] - Change package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 85724eac..81e10693 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "vialala-ngx-intl-tel-input-app", + "name": "ngx-intl-tel-input-app", "version": "0.0.0", "scripts": { "ng": "ng",