Skip to content

Commit

Permalink
DataViews: Fix react warning error in list layout (WordPress#60101)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jameskoster <[email protected]>
  • Loading branch information
3 people authored and cbravobernal committed Apr 9, 2024
1 parent c6a3494 commit c1dd393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/dataviews/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@
line-height: $grid-unit-20;

.dataviews-view-list__field {
margin: 0;

&:has(.dataviews-view-list__field-value:empty) {
display: none;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dataviews/src/view-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function ListItem( {
id={ descriptionId }
>
{ visibleFields.map( ( field ) => (
<p
<div
key={ field.id }
className="dataviews-view-list__field"
>
Expand All @@ -111,7 +111,7 @@ function ListItem( {
<span className="dataviews-view-list__field-value">
{ field.render( { item } ) }
</span>
</p>
</div>
) ) }
</div>
</VStack>
Expand Down

0 comments on commit c1dd393

Please sign in to comment.