Fix style of product type attributes empty table

This commit is contained in:
Dawid Tarasiuk 2020-10-02 12:36:41 +02:00
parent 769f30e135
commit 5adcc77e14

View file

@ -125,26 +125,28 @@ const ProductTypeAttributes: React.FC<ProductTypeAttributesProps> = props => {
<col className={classes.colSlug} />
<col className={classes.colAction} />
</colgroup>
<TableHead
colSpan={numberOfColumns}
disabled={disabled}
dragRows
selected={selected}
items={attributes}
toggleAll={toggleAll}
toolbar={toolbar}
>
<TableCell className={classes.colName}>
<FormattedMessage defaultMessage="Attribute name" />
</TableCell>
<TableCell className={classes.colName}>
<FormattedMessage
defaultMessage="Slug"
description="attribute internal name"
/>
</TableCell>
<TableCell />
</TableHead>
{attributes?.length > 0 && (
<TableHead
colSpan={numberOfColumns}
disabled={disabled}
dragRows
selected={selected}
items={attributes}
toggleAll={toggleAll}
toolbar={toolbar}
>
<TableCell className={classes.colName}>
<FormattedMessage defaultMessage="Attribute name" />
</TableCell>
<TableCell className={classes.colName}>
<FormattedMessage
defaultMessage="Slug"
description="attribute internal name"
/>
</TableCell>
<TableCell />
</TableHead>
)}
<SortableTableBody onSortEnd={onAttributeReorder}>
{renderCollection(
attributes,