-
Notifications
You must be signed in to change notification settings - Fork 734
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
Add workspaceName prop #772
Conversation
Before merging, please test if this solution works as I could not fully test the changes. The desired outcome would be a PlaygroundWrapper component which reacts to specific prop changes. To test it, one might create a component which passes changing endpoint props down to the PlaygroundWrapper/MiddlewareApp. |
@@ -379,7 +387,9 @@ class PlaygroundWrapper extends React.Component< | |||
fixedEndpoints={Boolean(this.state.configString)} | |||
headers={this.state.headers} | |||
configPath={this.props.configPath} | |||
workspaceName={this.state.activeProjectName} | |||
workspaceName={ | |||
this.state.activeProjectName || this.props.workspaceName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to the other way around - this.props.workspaceName || ...
as otherwise it's not possible to overwrite the workspaceName when using a graphql config
* Fix announcement link * fix: add workspaceName prop to PlaygroundWrapper with passthrough to Playground * fix: Added mapPropsToState to react to prop changes * fix: remove unnecessary check * fix: swapped orders of workspaceName and activeProjectName
Fixes #771
Changes proposed in this pull request: