question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

isReadOnly doesn't work

See original GitHub issue

Description

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

  1. set isReadOnly={true}
  2. 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:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
csandmancommented, Aug 31, 2022

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.

0reactions
csandmancommented, Sep 1, 2022

If you’re still having trouble with it feel free to reopen!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found