Skip to content

Commit

Permalink
proptypes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Aug 15, 2017
1 parent aa4e36c commit 0ed6fff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/widgets/field/BooleanField.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BooleanField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired,
convert: PropTypes.func.isRequired,
convert: PropTypes.oneOfType([PropTypes.func,PropTypes.object]),
};

BooleanField.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/field/EmailField.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ EmailField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired,
convert: PropTypes.func.isRequired
convert: PropTypes.oneOfType([PropTypes.func,PropTypes.object])
};

EmailField.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/field/NumberField.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ NumberField.propTypes = {
options: PropTypes.object,
record: PropTypes.object,
source: PropTypes.string.isRequired,
convert: PropTypes.func.isRequired,
convert: PropTypes.oneOfType([PropTypes.func,PropTypes.object]),
};

NumberField.defaultProps = {
Expand Down
8 changes: 4 additions & 4 deletions src/widgets/field/RichTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ RichTextField.propTypes = {
record: PropTypes.object,
source: PropTypes.string.isRequired,
stripTags: PropTypes.bool,
convert: PropTypes.func.isRequired
convert: PropTypes.oneOfType([PropTypes.func,PropTypes.object])
};

RichTextField.defaultProps = {
addLabel: true,
stripTags: false,
convert: function (value) {
return value
}
// convert: function (value) {
// return value
// }
};

export default RichTextField;
2 changes: 1 addition & 1 deletion src/widgets/field/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TextField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired,
convert: PropTypes.oneOf([PropTypes.func,PropTypes.object])
convert: PropTypes.oneOfType([PropTypes.func,PropTypes.object])
};

TextField.defaultProps = {
Expand Down

0 comments on commit 0ed6fff

Please sign in to comment.