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 <wildworks@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
  • Loading branch information
3 people authored and carstingaxion committed Mar 27, 2024
1 parent 9232f1c commit 87e259d
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 87e259d

Please sign in to comment.