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

InputOtp: Value is read-only (even if readOnly prop isn't set or false) #6432

Closed
AndrewMamdouh opened this issue Apr 21, 2024 · 1 comment · Fixed by #6433, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@AndrewMamdouh
Copy link
Contributor

Describe the bug

By changing InputOtp value, It raises an error and value can't be changed:

VM3144 inputotp.esm.js:53 Uncaught TypeError: "newTokens" is read-only
    at _readOnlyError (VM3144 inputotp.esm.js:53:11)
    at updateTokens (VM3144 inputotp.esm.js:4109:29)
    at onInput (VM3144 inputotp.esm.js:4115:9)
    at Object.onInput (VM3144 inputotp.esm.js:4188:24)
    at onInput (VM3144 inputotp.esm.js:3963:32)
    at HTMLUnknownElement.callCallback (react-dom.development.js:20565:14)
    at Object.invokeGuardedCallbackImpl (react-dom.development.js:20614:16)
    at invokeGuardedCallback (react-dom.development.js:20689:29)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:20703:25)
    at executeDispatch (react-dom.development.js:32128:3)
    at processDispatchQueueItemsInOrder (react-dom.development.js:32160:7)
    at processDispatchQueue (react-dom.development.js:32173:5)
    at dispatchEventsForPlugins (react-dom.development.js:32184:3)
    at eval (react-dom.development.js:32374:12)
    at batchedUpdates$1 (react-dom.development.js:24953:12)
    at batchedUpdates (react-dom.development.js:28844:12)
    at dispatchEventForPluginEventSystem (react-dom.development.js:32373:3)
    at dispatchEvent (react-dom.development.js:30141:5)
    at dispatchDiscreteEvent (react-dom.development.js:30112:5)

Screenshot 2024-04-21 020924

Reproducer

No response

PrimeReact version

10.6.3

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

Type in any value into InputOtp or try to remove any value from it.

Expected behavior

No response

@AndrewMamdouh AndrewMamdouh added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 21, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 21, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 21, 2024
@melloware
Copy link
Member

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
2 participants