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 ebf5526 commit 910211f
Showing 1 changed file with 1 addition and 1 deletion.
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 910211f

Please sign in to comment.