diff --git a/src/widgets/field/BooleanField.js b/src/widgets/field/BooleanField.js index b9cd516..50cc75a 100644 --- a/src/widgets/field/BooleanField.js +++ b/src/widgets/field/BooleanField.js @@ -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 = { diff --git a/src/widgets/field/EmailField.js b/src/widgets/field/EmailField.js index 95d70a2..6393fff 100644 --- a/src/widgets/field/EmailField.js +++ b/src/widgets/field/EmailField.js @@ -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 = { diff --git a/src/widgets/field/NumberField.js b/src/widgets/field/NumberField.js index 7eecd9e..a98eeb8 100644 --- a/src/widgets/field/NumberField.js +++ b/src/widgets/field/NumberField.js @@ -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 = { diff --git a/src/widgets/field/RichTextField.js b/src/widgets/field/RichTextField.js index 511e67b..3eec99f 100644 --- a/src/widgets/field/RichTextField.js +++ b/src/widgets/field/RichTextField.js @@ -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; diff --git a/src/widgets/field/TextField.js b/src/widgets/field/TextField.js index a95dcf8..a21c139 100644 --- a/src/widgets/field/TextField.js +++ b/src/widgets/field/TextField.js @@ -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 = {