-
Notifications
You must be signed in to change notification settings - Fork 2.8k
console: permission builder fixes #3823
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
Conversation
|
Deploy preview for hasura-docs ready! Built with commit be1cbfa |
|
Review app for commit 60809ec deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
|
Review app for commit 2b4cf6c deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
|
Review app for commit 9aa3745 deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
| dispatch(fetchFunctionInit()); | ||
| } | ||
|
|
||
| componentWillReceiveProps(nextProps) { |
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.
componentWillReceiveProps will be deprecated and in React 16.3 there was getDerivedStateFromProps introduced to replace it. So can we use this instead?
static getDerivedStateFromProps(nextProps, prevState) {
const currPermissionsState = prevState.permissionsState;
const nextPermissionsState = nextProps.permissionsState;
if (
currPermissionsState.role !== nextPermissionsState.role ||
currPermissionsState.query !== nextPermissionsState.query
) {
return { filterString: '' };
}
return null;
}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.
I didnt go down that route as I would then have to store the previousProps in state which I wanted to avoid. Is there any other way I am not aware of?
In any case, we should be converting all these to hooks anyway when we refactor so it might not be worth adding a lot of code to achieve this
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.
Figured out an easy workaround
|
Review app for commit be1cbfa deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
|
Review app for commit 8fc27c3 deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
|
Review app https://hge-ci-pull-3823.herokuapp.com is deleted |
|
Review app for commit fca8247 deployed to Heroku: https://hge-ci-pull-3823.herokuapp.com |
* allow manually editing permissions (hasura#1734) * separate operators for json and jsonb column types * allow null as valid JSON type
Description
nullas valid JSON typeAffected components
Related Issues
Solution and Design
Steps to test and verify
Limitations, known bugs & workarounds