Skip to content

Commit

Permalink
Use PropTypes.elementType to support wrapped components
Browse files Browse the repository at this point in the history
Components wrapped in `forwardRef`do not identify as a function but as a
object. Use PropTypes.elementType to allow those as well.

Fixes: yury-dymov#40
  • Loading branch information
silverwind committed Apr 17, 2020
1 parent a60532b commit 6a4ca99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -60,7 +60,7 @@
},
"dependencies": {
"get-input-selection": "^1.1.4",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"textarea-caret": "^3.0.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/AutoCompleteTextField.js
Expand Up @@ -17,7 +17,7 @@ const OPTION_LIST_MIN_WIDTH = 100;
const propTypes = {
Component: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.elementType,
]),
defaultValue: PropTypes.string,
disabled: PropTypes.bool,
Expand Down

0 comments on commit 6a4ca99

Please sign in to comment.