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

JSX boolean attribute "readOnly" should not use string values #4917

Closed
locomotif opened this issue Oct 2, 2018 · 2 comments
Closed

JSX boolean attribute "readOnly" should not use string values #4917

locomotif opened this issue Oct 2, 2018 · 2 comments

Comments

@locomotif
Copy link

locomotif commented Oct 2, 2018

Q&A (please complete the following information)

  • OS: macOS
  • Browser: Chrome
  • Version: 69.0.3497.100 (Official Build) (64-bit)
  • Method of installation: yarn
  • Swagger-UI version: 3.19.0
  • Swagger/OpenAPI version: 3.19.0

To reproduce...

This is not necessarily a bug, but maybe a react best practice. When executing a sample rest endpoint, I am noticing a warning on the console. Please see screenshot below. The issue originates from swagger-ui/src/core/components/curl.jsx

Please note the readOnly attribute

<textarea onFocus={this.handleFocus} readOnly="true" className="curl" style={{ whiteSpace: "normal" }} value={curl}></textarea>
// ...should be
<textarea onFocus={this.handleFocus} readOnly className="curl" style={{ whiteSpace: "normal" }} value={curl}></textarea>

Expected behavior

I expect no warnings

Screenshots

image

@locomotif locomotif changed the title React attributes React boolean attributes should not use string values Oct 2, 2018
@locomotif locomotif changed the title React boolean attributes should not use string values JSX boolean attribute "readOnly" should not use string values Oct 2, 2018
@hkosova
Copy link
Contributor

hkosova commented Aug 8, 2019

PR: #5497

@shockey
Copy link
Contributor

shockey commented Aug 23, 2019

fixed in #5497!

@shockey shockey closed this as completed Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants