Merge pull request #15123 from strapi/fix/overflows-in-repeatable-components

This commit is contained in:
Josh 2022-12-08 10:35:24 +00:00 committed by GitHub
commit 5de5a3bb4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 31 deletions

View File

@ -325,35 +325,37 @@ const RelationInput = ({
)
}
>
<RelationList overflow={overflow}>
<VisuallyHidden id={ariaDescriptionId}>{listAriaDescription}</VisuallyHidden>
<VisuallyHidden aria-live="assertive">{liveText}</VisuallyHidden>
<List
height={dynamicListHeight}
ref={listRef}
outerRef={outerListRef}
itemCount={totalNumberOfRelations}
itemSize={RELATION_ITEM_HEIGHT + RELATION_GUTTER}
itemData={{
ariaDescribedBy: ariaDescriptionId,
canDrag: canReorder,
disabled,
handleCancel: onCancel,
handleDropItem: onDropItem,
handleGrabItem: onGrabItem,
iconButtonAriaLabel,
labelDisconnectRelation,
onRelationDisconnect,
publicationStateTranslations,
relations,
updatePositionOfRelation: handleUpdatePositionOfRelation,
}}
itemKey={(index, { relations: relationsItems }) => relationsItems[index].id}
innerElementType="ol"
>
{ListItem}
</List>
</RelationList>
{relations.length > 0 && (
<RelationList overflow={overflow}>
<VisuallyHidden id={ariaDescriptionId}>{listAriaDescription}</VisuallyHidden>
<VisuallyHidden aria-live="assertive">{liveText}</VisuallyHidden>
<List
height={dynamicListHeight}
ref={listRef}
outerRef={outerListRef}
itemCount={totalNumberOfRelations}
itemSize={RELATION_ITEM_HEIGHT + RELATION_GUTTER}
itemData={{
ariaDescribedBy: ariaDescriptionId,
canDrag: canReorder,
disabled,
handleCancel: onCancel,
handleDropItem: onDropItem,
handleGrabItem: onGrabItem,
iconButtonAriaLabel,
labelDisconnectRelation,
onRelationDisconnect,
publicationStateTranslations,
relations,
updatePositionOfRelation: handleUpdatePositionOfRelation,
}}
itemKey={(index, { relations: relationsItems }) => relationsItems[index].id}
innerElementType="ol"
>
{ListItem}
</List>
</RelationList>
)}
{(description || error) && (
<Box paddingTop={2}>
<FieldHint />

View File

@ -14,7 +14,6 @@ export const Footer = styled(Box)`
export const Content = styled(Box)`
border-bottom: none;
overflow: hidden;
/* add the borders and make sure the top is transparent to avoid jumping with the hover effect */
& > div > div {

View File

@ -15,7 +15,6 @@ exports[`RepeatableComponent | Accordion Content should render and match the sna
.c0 {
border-bottom: none;
overflow: hidden;
}
.c0 > div > div {