mirror of
https://github.com/strapi/strapi.git
synced 2025-08-06 07:50:02 +00:00
fix RelationInput proptypes issues
This commit is contained in:
parent
2766b93940
commit
f7b51cd2f2
@ -156,7 +156,7 @@ const RelationInput = ({
|
|||||||
inputId={id}
|
inputId={id}
|
||||||
isSearchable
|
isSearchable
|
||||||
isClear
|
isClear
|
||||||
loadingMessage={() => loadingMessage}
|
loadingMessage={loadingMessage}
|
||||||
onChange={(relation) => {
|
onChange={(relation) => {
|
||||||
setValue(null);
|
setValue(null);
|
||||||
onRelationAdd(relation);
|
onRelationAdd(relation);
|
||||||
|
@ -50,5 +50,5 @@ Relation.propTypes = {
|
|||||||
search: PropTypes.node,
|
search: PropTypes.node,
|
||||||
loadMore: PropTypes.node,
|
loadMore: PropTypes.node,
|
||||||
size: PropTypes.number.isRequired,
|
size: PropTypes.number.isRequired,
|
||||||
totalNumberOfRelations: PropTypes.string,
|
totalNumberOfRelations: PropTypes.number,
|
||||||
};
|
};
|
||||||
|
@ -43,10 +43,10 @@ export const RelationList = ({ children, ...props }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
RelationList.defaultProps = {
|
RelationList.defaultProps = {
|
||||||
overflow: undefined,
|
overflow: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
RelationList.propTypes = {
|
RelationList.propTypes = {
|
||||||
children: PropTypes.node.isRequired,
|
children: PropTypes.node.isRequired,
|
||||||
overflow: PropTypes.oneOf(['top-bottom', 'bottom', 'top']),
|
overflow: PropTypes.oneOf(['top-bottom', 'bottom', 'top', '']),
|
||||||
};
|
};
|
||||||
|
@ -97,6 +97,7 @@ exports[`Content-Manager || RelationInput || RelationList should render and matc
|
|||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="c0"
|
class="c0"
|
||||||
|
overflow=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="c1 c2"
|
class="c1 c2"
|
||||||
|
@ -63,7 +63,7 @@ const setup = (props) =>
|
|||||||
name="some-relation-1"
|
name="some-relation-1"
|
||||||
label="Some Relation"
|
label="Some Relation"
|
||||||
labelLoadMore="Load more"
|
labelLoadMore="Load more"
|
||||||
loadingMessage="Relations are loading"
|
loadingMessage={() => 'Relations are loading'}
|
||||||
numberOfRelationsToDisplay={5}
|
numberOfRelationsToDisplay={5}
|
||||||
onRelationAdd={() => jest.fn()}
|
onRelationAdd={() => jest.fn()}
|
||||||
onSearchOpen={() => jest.fn()}
|
onSearchOpen={() => jest.fn()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user