Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Issue-317 set autocomplete attribute for search countries input #454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
(keyup)="searchCountry()"
(click)="$event.stopPropagation()"
[placeholder]="searchCountryPlaceholder"
[autocomplete]="searchCountryAutocomplete"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter name doesn't match with the functionality. Please make it more readable. searchCountryAutocomplete maybe. And make it boolean not string.

Copy link
Author

@rene-guerrero rene-guerrero May 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reply I will make it boolean. What do you mean with "searchCountryAutocomplete maybe", it's literally the same name i used. What about enableSearchCountryAutocomplete?
Also do you think it should be enabled or disabled by default?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autofocus>
</div>
<ul class="iti__country-list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class NgxIntlTelInputComponent implements OnInit, OnChanges {
@Input() searchCountryFlag = false;
@Input() searchCountryField: SearchCountryField[] = [SearchCountryField.All];
@Input() searchCountryPlaceholder = 'Search Country';
@Input() searchCountryAutocomplete: string = 'on';
@Input() maxLength: number;
@Input() selectFirstCountry = true;
@Input() selectedCountryISO: CountryISO;
Expand Down
1 change: 1 addition & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ <h1>Test International Telephone Input Form</h1>
[searchCountryField]="[SearchCountryField.Iso2, SearchCountryField.Name]"
[selectFirstCountry]="false"
[selectedCountryISO]="CountryISO.India"
[searchCountryAutocomplete]="'off'"
[maxLength]="15"
[phoneValidation]="true"
[separateDialCode]="separateDialCode"
Expand Down