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

Number input doesn't respect "readOnly" prop #2955

Closed
Sajarin-M opened this issue Nov 14, 2022 · 1 comment
Closed

Number input doesn't respect "readOnly" prop #2955

Sajarin-M opened this issue Nov 14, 2022 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@Sajarin-M
Copy link
Contributor

What package has an issue

@mantine/core

Describe the bug

The value of number input is changeable even if the readOnly prop is set, by
clicking on the controls
or by arrow key press

What version of @mantine/hooks page do you have in package.json?

5.7.2

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/readonly-numberinput-6bbtlt?file=/src/App.js:286-294

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

manually check if readOnly prop is set like already done for disabled prop

@rtivital
Copy link
Member

Fixed in 5.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants