fix(prop-types): check for react components via PropTypes.elementType (#4025)
This commit is contained in:
@ -52,7 +52,7 @@
|
||||
"react-modal": "^3.8.1",
|
||||
"react-polyglot": "^0.7.0",
|
||||
"react-redux": "^7.2.0",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-scroll-sync": "^0.8.0",
|
||||
"react-sortable-hoc": "^1.0.0",
|
||||
"react-split-pane": "^0.1.85",
|
||||
|
@ -52,7 +52,7 @@ export default class Widget extends Component {
|
||||
clearSearch: PropTypes.func.isRequired,
|
||||
clearFieldErrors: PropTypes.func.isRequired,
|
||||
queryHits: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
|
||||
editorControl: PropTypes.func.isRequired,
|
||||
editorControl: PropTypes.elementType.isRequired,
|
||||
uniqueFieldId: PropTypes.string.isRequired,
|
||||
loadEntry: PropTypes.func.isRequired,
|
||||
t: PropTypes.func.isRequired,
|
||||
@ -278,6 +278,7 @@ export default class Widget extends Component {
|
||||
parentIds,
|
||||
t,
|
||||
} = this.props;
|
||||
|
||||
return React.createElement(controlComponent, {
|
||||
entry,
|
||||
collection,
|
||||
|
Reference in New Issue
Block a user