mirror of
https://github.com/strapi/strapi.git
synced 2025-07-24 01:18:17 +00:00
Merge branch 'master' of https://github.com/strapi/strapi into update-getting-started-doc
This commit is contained in:
commit
cc4e1bd762
@ -17,6 +17,14 @@ import styles from './styles.scss';
|
||||
class Plugin extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||
state = { collapse: false };
|
||||
|
||||
componentDidMount() {
|
||||
// Open the application's permissions section if there are APIs
|
||||
if (this.props.name === 'application' && !isEmpty(get(this.props.plugin, 'controllers'))) {
|
||||
this.props.changePluginSelected('application');
|
||||
this.setState({ collapse: !this.state.collapse });
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.pluginSelected !== this.props.pluginSelected && nextProps.pluginSelected !== this.props.name) {
|
||||
this.context.resetShouldDisplayPoliciesHint();
|
||||
|
Loading…
x
Reference in New Issue
Block a user