-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat(intl-phone-input): add handlers #760
Conversation
🦋 Changeset detectedLatest commit: e83c2e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Pull Request Test Coverage Report for Build 5677907222
💛 - Coveralls |
Собрана новая демка. |
Собрана новая демка. |
@@ -459,6 +461,7 @@ export const IntlPhoneInput = forwardRef<HTMLInputElement, IntlPhoneInputProps>( | |||
const resultNumber = preparedNumber.substring(0, maxPhoneLength + 1); | |||
|
|||
if (resultNumber) { | |||
inputProps?.onPaste?.(event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему коллбэк вызывается при условии? Он на каждый вызов handlePaste вызываться должен, думаю
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
просто текст из буфера вставляется после проверок выше.
Думаешь правильно вызывать хендлер вставки если текст не вставился в поле по итогу?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Думаю, что да. ИМХО он должен вызываться по событию paste
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
передвинул
Собрана новая демка. |
Опишите проблему
При прокидывании хендлеров onClear и onPaste они перетирают логику компонента.
Ожидаемое поведение
Нужно чтобы хендлеры для inputProps вызывались не нарушаю внутреннюю логику хендлеров компонента IntlPhoneInput