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

RadioButton, ToggleButton: Warning: Invalid DOM property readonly. Did you mean readOnly? #6186

Closed
arnodemer opened this issue Mar 20, 2024 · 3 comments · Fixed by #6188
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@arnodemer
Copy link
Contributor

Describe the bug

Both components RadioButton and ToggleButton (maybe others?) reference lowercase 'readonly' but React uses camel case readOnly as props.
Warning is displayed while runnin jest tests (laso when running react in dev. mode)

Reproducer

No response

PrimeReact version

10.5.3

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

Warning: Invalid DOM property readonly. Did you mean readOnly?
at input
at div
at eval (webpack-internal:///./components/lib/radiobutton/RadioButton.js:24:83)
at div

Warning: Invalid DOM property readonly. Did you mean readOnly?
at input
at div
at D:\onetest-server\frontend\node_modules\primereact\togglebutton*togglebutton*.cjs.js:146:26
at div

Expected behavior

No response

@arnodemer arnodemer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 20, 2024
@arnodemer
Copy link
Contributor Author

Hi @melloware,
showcase page (https://primereact.org/togglebutton/) have a Button section under Components.
I'm surprised that RadioButton, ToggleButton and SelectButton aren't displayed under Button section, is it expected ?

@melloware
Copy link
Member

yes as these are "Input" components so they go under Forms. Buttons are not input components.

@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 Mar 20, 2024
@melloware melloware added this to the 10.6.0 milestone Mar 20, 2024
@melloware melloware assigned melloware and unassigned nitrogenous and gucal Mar 20, 2024
@melloware
Copy link
Member

PR Submitted

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
Development

Successfully merging a pull request may close this issue.

4 participants