Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix "attribute name" column padding

dominik-zeglen850d3e43f4eb
diff --git a/saleor/static/dashboard-next/components/TableHead/TableHead.tsx b/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
index 3060fda1ac..6698d669b9 100644
--- a/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
+++ b/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
@@ -92,7 +92,7 @@ const TableHead = withStyles(styles, {
return (
<MuiTableHead {...muiTableHeadProps}>
<TableRow>
- {dragRows && (
+ {dragRows && (items === undefined || items.length > 0) && (
<TableCell
className={classNames({
[classes.checkboxSelected]: selected
diff --git a/saleor/static/dashboard-next/storybook/stories/productTypes/ProductTypeDetailsPage.tsx b/saleor/static/dashboard-next/storybook/stories/productTypes/ProductTypeDetailsPage.tsx
index a95a7a11bf..0fd3705157 100644
--- a/saleor/static/dashboard-next/storybook/stories/productTypes/ProductTypeDetailsPage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/productTypes/ProductTypeDetailsPage.tsx
@@ -42,6 +42,15 @@ storiesOf("Views / Product types / Product type details", module)
productType={undefined}
/>
))
+ .add("no attributes", () => (
+ <ProductTypeDetailsPage
+ {...props}
+ productType={{
+ ...productType,
+ productAttributes: []
+ }}
+ />
+ ))
.add("form errors", () => (
<ProductTypeDetailsPage
{...props}