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

SwaggerEditor@next: readonly mode set via prop override #4976

Closed
char0n opened this issue Apr 24, 2024 · 1 comment
Closed

SwaggerEditor@next: readonly mode set via prop override #4976

char0n opened this issue Apr 24, 2024 · 1 comment

Comments

@char0n
Copy link
Member

char0n commented Apr 24, 2024

Readonly mode is managed via a redux state. But, it's also possible to pull an Editor component out from the system and pass it isReadOnly prop explicitly.

  const Editor = getComponent('Editor', true);

  <Editor isReadOnly />
  <Editor />

If passing the explicit isReadOnly prop is used, the prop is ignored and the redux state is always preferred.


The goal of this issue is to always prefer theisReadOnly prop if passed explicitly + overriding the redux state with the vlaue of the prop.

@char0n
Copy link
Member Author

char0n commented Apr 24, 2024

Addressed in #4977

@char0n char0n closed this as completed Apr 24, 2024
swagger-bot pushed a commit that referenced this issue Apr 24, 2024
# [5.0.0-alpha.94](v5.0.0-alpha.93...v5.0.0-alpha.94) (2024-04-24)

### Bug Fixes

* **content-read-only:** priorize explicit prop over redux state ([#4977](#4977)) ([91cc57c](91cc57c)), closes [#4976](#4976)
* **editor-safe-render:** fix list of safe components ([#4979](#4979)) ([d299d75](d299d75))

### Features

* integrate with new SwaggerUI config capabilities ([#4973](#4973)) ([481cb31](481cb31)), closes [#4972](#4972)
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

1 participant