fix(Models): onLoad should check this.props.layoutSelectors method (#6307)

ref #6305
This commit is contained in:
Tim Lai
2020-08-17 13:38:16 -07:00
committed by GitHub
parent 3e144f5f7d
commit 168d0ae7ac

View File

@@ -65,7 +65,7 @@ export default class ModelCollapse extends Component {
}
onLoad = (ref) => {
if(ref) {
if (ref && this.props.layoutSelectors) {
const scrollToKey = this.props.layoutSelectors.getScrollToKey()
if( Im.is(scrollToKey, this.props.specPath) ) this.toggleCollapsed()