isReadOnly doesn't work
See original GitHub issueDescription
When property isReadOnly={true}
select is still editable
chakra-react-select Version
4.1.5
Link to Reproduction
No response
TypeScript?
- Yes I use TypeScript
Steps to reproduce
- set
isReadOnly={true}
- try to edit the select
Operating System
- macOS
- Windows
- Linux
- iOS/iPadOS
- Android
Additional Information
I fixed this issue by wrapping component in div
with style pointerEvents: "none"
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Select isReadOnly option not working as intended · Issue #2381
Hi @recursiveElk,. The thing is, readonly cannot be applied to the native HTML select element. That's the reason it doesn't work.
Read more >Textbox style trigger with "IsReadOnly" not working
It works when I use IsEnabled=True. However IsEnabled=False doesn't work either. So, question: Do the triggers only work if you check for "True" ......
Read more >IsReadOnly does seem to work in UI for WPF | Telerik Forums
Hi.. I set IsReadOnly = true , in code But I can still change the values and select other items. How do I...
Read more >IsReadOnly and Keyboard does not work anymore - WPF Bug?
I have created a TextBox that is read only. Once the text is read only however the arrow and page keys no longer...
Read more >HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was never a fully implemented feature, as I wasn’t sure of its usefulness relative to disabled. Hence why it’s not in the docs. Is this something you have some use for? If so, I’m curious about the use case, and I could put some effort into fixing it.
If you’re still having trouble with it feel free to reopen!