Skip to content

Commit

Permalink
DataViews: Fix table view cell wrapper and BlockPreviews (#58062)
Browse files Browse the repository at this point in the history
* DataViews: Fix table view cell wrapper and BlockPreviews

* try preserving flex
  • Loading branch information
ntsekouras authored Jan 26, 2024
1 parent ddde310 commit ebab5b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/dataviews/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
min-height: $grid-unit-40;
display: flex;
align-items: center;

> * {
flex-grow: 1;
}
}
}
.dataviews-view-table-header-button {
Expand Down
8 changes: 4 additions & 4 deletions packages/dataviews/src/view-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ function ViewTable( {
minWidth: 20,
} }
>
<span className="dataviews-view-table__cell-content-wrapper">
<div className="dataviews-view-table__cell-content-wrapper">
<SingleSelectionCheckbox
id={
getItemId( item ) || index
Expand All @@ -553,7 +553,7 @@ function ViewTable( {
data={ data }
primaryField={ primaryField }
/>
</span>
</div>
</td>
) }
{ visibleFields.map( ( field ) => (
Expand All @@ -567,7 +567,7 @@ function ViewTable( {
field.maxWidth || undefined,
} }
>
<span
<div
className={ classnames(
'dataviews-view-table__cell-content-wrapper',
{
Expand All @@ -580,7 +580,7 @@ function ViewTable( {
{ field.render( {
item,
} ) }
</span>
</div>
</td>
) ) }
{ !! actions?.length && (
Expand Down

0 comments on commit ebab5b6

Please sign in to comment.