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(intl-phone-input): ability to overwrite country-data #1562

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mikhail-yurin
Copy link
Contributor

Опишите проблему

Требование от НСПК: возможная длина номера тлф до 15 цифр

Добавил пропс для переопределения дефолтного массива countriesData, чтобы по месту использования компонента можно было передать массив в котором уже будет нужная длина номеров телефонов

Copy link

changeset-bot bot commented Feb 3, 2025

🦋 Changeset detected

Latest commit: 09a5a9f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alfalab/core-components-international-phone-input Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link

coveralls commented Feb 3, 2025

Pull Request Test Coverage Report for Build 13114230259

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 82.344%

Totals Coverage Status
Change from base Build 13108226569: 0.001%
Covered Lines: 10798
Relevant Lines: 11967

💛 - Coveralls

/**
*
* Список правил парсинга номеров телефонов по странам (для переопределения дефолтного)
* @type {CountriesData[]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Пожалуй это лишнее (@type {CountriesData[]}), ведь мы находимся в парадигме ts и переданный тип для пропса говорит сам за себя.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Это описание (вместе с типом) нужно для сторибука, благодаря этому doc отображается параметр с его описанием

Copy link
Collaborator

@fulcanellee fulcanellee Feb 3, 2025

Choose a reason for hiding this comment

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

я имел ввиду только строчку 50, где указан @type. описание трогать не нужно

@fulcanellee
Copy link
Collaborator

fulcanellee commented Feb 3, 2025

  1. Нужен changeset
  2. Я бы назвал пропс initCountriesList с использованием слова custom, так как по сути то что заложено в компонент и есть init(ial)

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

@mikhail-yurin
Copy link
Contributor Author

  1. Нужен changeset
  2. Я бы назвал пропс initCountriesList с использованием слова custom, так как по сути то что заложено в компонент и есть init(ial)
  • Добавил changeset
  • Переименовал пропс в customCountriesList

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants