mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 23:09:47 +00:00
RelationInputDataManager: Pass down error prop from the CM
This commit is contained in:
parent
70d8fd8158
commit
c712f5dd0d
@ -12,6 +12,7 @@ import { PUBLICATION_STATES, RELATIONS_TO_DISPLAY, SEARCH_RESULTS_TO_DISPLAY } f
|
|||||||
import { getTrad } from '../../utils';
|
import { getTrad } from '../../utils';
|
||||||
|
|
||||||
export const RelationInputDataManager = ({
|
export const RelationInputDataManager = ({
|
||||||
|
error,
|
||||||
componentId,
|
componentId,
|
||||||
editable,
|
editable,
|
||||||
description,
|
description,
|
||||||
@ -143,6 +144,7 @@ export const RelationInputDataManager = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RelationInput
|
<RelationInput
|
||||||
|
error={error}
|
||||||
description={description}
|
description={description}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
id={name}
|
id={name}
|
||||||
@ -208,6 +210,7 @@ export const RelationInputDataManager = ({
|
|||||||
RelationInputDataManager.defaultProps = {
|
RelationInputDataManager.defaultProps = {
|
||||||
componentId: undefined,
|
componentId: undefined,
|
||||||
editable: true,
|
editable: true,
|
||||||
|
error: undefined,
|
||||||
description: '',
|
description: '',
|
||||||
labelAction: null,
|
labelAction: null,
|
||||||
isFieldAllowed: true,
|
isFieldAllowed: true,
|
||||||
@ -218,6 +221,11 @@ RelationInputDataManager.defaultProps = {
|
|||||||
RelationInputDataManager.propTypes = {
|
RelationInputDataManager.propTypes = {
|
||||||
componentId: PropTypes.number,
|
componentId: PropTypes.number,
|
||||||
editable: PropTypes.bool,
|
editable: PropTypes.bool,
|
||||||
|
error: PropTypes.shape({
|
||||||
|
id: PropTypes.string.isRequired,
|
||||||
|
defaultMessage: PropTypes.string.isRequired,
|
||||||
|
values: PropTypes.object,
|
||||||
|
}),
|
||||||
description: PropTypes.string,
|
description: PropTypes.string,
|
||||||
intlLabel: PropTypes.shape({
|
intlLabel: PropTypes.shape({
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user