Skip to content

Commit

Permalink
Allow react nodes to be passed as loadingPlaceholder
Browse files Browse the repository at this point in the history
Everywhere we use loadingPlaceholder already supports `node` or `string`, 
so no other changes should be required if I'm reading correctly.
  • Loading branch information
DanielHeath authored Sep 29, 2016
1 parent 962f138 commit 2e37a5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Async.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const propTypes = {
children: React.PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
ignoreAccents: React.PropTypes.bool, // strip diacritics when filtering; defaults to true
ignoreCase: React.PropTypes.bool, // perform case-insensitive filtering; defaults to true
loadingPlaceholder: PropTypes.string.isRequired, // replaces the placeholder while options are loading
loadingPlaceholder: React.PropTypes.oneOfType([ // replaces the placeholder while options are loading
React.PropTypes.string,
React.PropTypes.node
]),
loadOptions: React.PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
options: PropTypes.array.isRequired, // array of options
placeholder: React.PropTypes.oneOfType([ // field placeholder, displayed when there's no value (shared with Select)
Expand Down

0 comments on commit 2e37a5d

Please sign in to comment.