Skip to content

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

Fix tableHead action bar position

Krzysztof Bialoglowicz5db4ccedd9e4
diff --git a/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx b/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx
index 013d217508..2a16c52e96 100644
--- a/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx
+++ b/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx
@@ -44,9 +44,6 @@ const styles = (theme: Theme) =>
colSubcategories: {
textAlign: "center"
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer"
}
@@ -98,7 +95,7 @@ const CategoryList = withStyles(styles, { name: "CategoryList" })(
}
/>
)}
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx b/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx
index ad661d520c..c9acda5303 100644
--- a/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx
+++ b/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx
@@ -38,9 +38,6 @@ const styles = (theme: Theme) =>
colProducts: {
textAlign: "center"
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer" as "pointer"
}
@@ -69,7 +66,7 @@ const CollectionList = withStyles(styles, { name: "CollectionList" })(
toolbar
}: CollectionListProps) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx
index a79f94aaf3..4166684b9a 100644
--- a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx
+++ b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx
@@ -35,9 +35,6 @@ const styles = (theme: Theme) =>
},
width: 48 + theme.spacing.unit / 2
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer"
}
@@ -92,7 +89,7 @@ const CollectionProducts = withStyles(styles, { name: "CollectionProducts" })(
</Button>
}
/>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
index d3021ea0ab..5afa650d79 100644
--- a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
@@ -53,9 +53,6 @@ const styles = (theme: Theme) =>
link: {
cursor: "pointer"
},
- table: {
- position: "relative"
- },
textLeft: {
textAlign: "left"
},
@@ -86,7 +83,7 @@ export const ProductList = withStyles(styles, { name: "ProductList" })(
onPreviousPage,
onRowClick
}: ProductListProps) => (
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/components/TableHead/TableHead.tsx b/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
index 79d12299da..edaa96d681 100644
--- a/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
+++ b/saleor/static/dashboard-next/components/TableHead/TableHead.tsx
@@ -38,7 +38,7 @@ const styles = (theme: Theme) =>
container: {
alignItems: "center",
display: "flex",
- height: 56,
+ height: 47,
marginRight: -theme.spacing.unit * 2
},
padding: {
@@ -49,10 +49,8 @@ const styles = (theme: Theme) =>
root: {
backgroundColor: fade(theme.palette.primary.main, 0.05),
borderBottom: "1px solid rgba(224, 224, 224, 1)",
- paddingLeft: 12,
- paddingRight: 24,
- position: "absolute",
- width: "calc(100% - 72px)"
+ paddingLeft: 0,
+ paddingRight: 24
},
spacer: {
flex: 1
@@ -99,7 +97,7 @@ const TableHead = withStyles(styles, {
</TableCell>
{selected ? (
<>
- <div className={classNames(classes.root)}>
+ <TableCell className={classNames(classes.root)} colSpan={50}>
<div className={classes.container}>
{selected && (
<Typography>
@@ -111,7 +109,7 @@ const TableHead = withStyles(styles, {
<div className={classes.spacer} />
<div className={classes.toolbar}>{toolbar}</div>
</div>
- </div>
+ </TableCell>
</>
) : (
children
diff --git a/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx b/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx
index f3ea623e07..d8f44010a2 100644
--- a/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx
+++ b/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx
@@ -35,9 +35,6 @@ const styles = (theme: Theme) =>
colOrders: {
textAlign: "center"
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer"
}
@@ -66,7 +63,7 @@ const CustomerList = withStyles(styles, { name: "CustomerList" })(
isChecked
}: CustomerListProps) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx b/saleor/static/dashboard-next/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx
index a88e81cbca..73c0449aab 100644
--- a/saleor/static/dashboard-next/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx
+++ b/saleor/static/dashboard-next/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx
@@ -55,9 +55,6 @@ const styles = (theme: Theme) =>
marginBottom: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2
},
- table: {
- border: "1px solid " + theme.palette.grey[200]
- },
wideCell: {
width: "100%"
}
@@ -120,7 +117,7 @@ const DiscountCountrySelectDialog = withStyles(styles, {
context: "country selection"
})}
</Typography>
- <Table className={classes.table}>
+ <Table>
<TableBody>
{filter(countries, data.query, {
key: "country"
diff --git a/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx b/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx
index 459c57ef54..7b51ca0e2f 100644
--- a/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx
+++ b/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx
@@ -54,9 +54,6 @@ const styles = (theme: Theme) =>
colValue: {
textAlign: "right"
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer"
}
@@ -81,7 +78,7 @@ const SaleList = withStyles(styles, {
toolbar
}: SaleListProps & WithStyles<typeof styles>) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx b/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx
index 90fcf9f357..87808d33fb 100644
--- a/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx
+++ b/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx
@@ -66,9 +66,6 @@ const styles = (theme: Theme) =>
colValue: {
textAlign: "right"
},
- table: {
- position: "relative"
- },
tableRow: {
cursor: "pointer"
},
@@ -96,7 +93,7 @@ const VoucherList = withStyles(styles, {
toolbar
}: VoucherListProps & WithStyles<typeof styles>) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx b/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx
index 55989a6c77..858114af61 100644
--- a/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx
+++ b/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx
@@ -42,9 +42,6 @@ const styles = (theme: Theme) =>
colTitle: {},
row: {
cursor: "pointer"
- },
- table: {
- position: "relative"
}
});
const MenuList = withStyles(styles, { name: "MenuList" })(
@@ -64,7 +61,7 @@ const MenuList = withStyles(styles, { name: "MenuList" })(
toolbar
}: MenuListProps & WithStyles<typeof styles>) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx
index 8a649373d2..4763f2f0d9 100644
--- a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx
@@ -56,9 +56,6 @@ const styles = (theme: Theme) =>
},
link: {
cursor: "pointer"
- },
- table: {
- position: "relative"
}
});
@@ -92,7 +89,7 @@ export const OrderList = withStyles(styles, { name: "OrderList" })(
}))
: undefined;
return (
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx b/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx
index a82fd6c16c..ca72cf9636 100644
--- a/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx
+++ b/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx
@@ -42,9 +42,6 @@ const styles = (theme: Theme) =>
colVisibility: {},
link: {
cursor: "pointer"
- },
- table: {
- position: "relative"
}
});
const PageList = withStyles(styles, { name: "PageList" })(
@@ -63,7 +60,7 @@ const PageList = withStyles(styles, { name: "PageList" })(
toolbar
}: PageListProps & WithStyles<typeof styles>) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx b/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx
index cb50d14f7e..ca2f18f6d6 100644
--- a/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx
+++ b/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx
@@ -38,9 +38,6 @@ const styles = (theme: Theme) =>
colType: {},
link: {
cursor: "pointer"
- },
- table: {
- position: "relative"
}
});
@@ -67,7 +64,7 @@ const ProductTypeList = withStyles(styles, { name: "ProductTypeList" })(
toolbar
}: ProductTypeListProps) => (
<Card>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}
diff --git a/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx
index 776136265c..c87c34f1e3 100644
--- a/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx
+++ b/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx
@@ -48,9 +48,6 @@ const styles = (theme: Theme) =>
colName: {},
row: {
cursor: "pointer"
- },
- table: {
- position: "relative"
}
});
const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
@@ -82,7 +79,7 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
</Button>
}
/>
- <Table className={classes.table}>
+ <Table>
<TableHead
selected={selected}
disabled={disabled}