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

Component: InputOtp - Misleading documentation when using template #16704

Open
rehdie opened this issue Nov 7, 2024 · 1 comment
Open

Component: InputOtp - Misleading documentation when using template #16704

rehdie opened this issue Nov 7, 2024 · 1 comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@rehdie
Copy link

rehdie commented Nov 7, 2024

Describe the bug

The example for the templates contains some problems:

  1. only the keydown and input-events are forwarded to the events-object, which cause pasting to fail (see p-inputOtp does not paste code sent by SMS, only sets the first digit #16373)
  2. If you use [attr.value]="token" as in the example, this causes a weird effect, when pasting: Paste the OTP, clear all fields and paste again => the formControl (the model) is filled but all input-fields remain empty! You have to use [value]="token ?? ''" to fix this issue (if you use [value]="token", the input-fields initially contain "undefined"!)

Environment

Windows 10

Reproducer

No response

Angular version

18.2.0

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.18.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@rehdie rehdie added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 7, 2024
@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 19, 2024
@mertsincan mertsincan added this to the Future milestone Nov 19, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

2 participants