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