Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Do not propagate clicke event from bulk actions
dominik-zeglene3594742d34a
diff --git a/saleor/static/dashboard-next/attributes/components/AttributeList/AttributeList.tsx b/saleor/static/dashboard-next/attributes/components/AttributeList/AttributeList.tsxindex 3a0e2ace8e..b3826b85d5 100644--- a/saleor/static/dashboard-next/attributes/components/AttributeList/AttributeList.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributeList/AttributeList.tsx@@ -12,7 +12,7 @@ import Skeleton from "@saleor/components/Skeleton";import TableHead from "@saleor/components/TableHead";import TablePagination from "@saleor/components/TablePagination";import i18n from "@saleor/i18n";-import { renderCollection } from "@saleor/misc";+import { renderCollection, stopPropagation } from "@saleor/misc";import { ListActions, ListProps } from "@saleor/types";import { translateBoolean } from "@saleor/utils/i18n";import { AttributeList_attributes_edges_node } from "../../types/AttributeList";@@ -133,6 +133,7 @@ const AttributeList: React.StatelessComponent<AttributeListProps> = ({<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(attribute.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx b/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsxindex c4d11a78d8..293e04830e 100644--- a/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx+++ b/saleor/static/dashboard-next/categories/components/CategoryList/CategoryList.tsx@@ -151,6 +151,7 @@ const CategoryList = withStyles(styles, { name: "CategoryList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(category.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx b/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsxindex 9e647beced..fd63f69a33 100644--- a/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx+++ b/saleor/static/dashboard-next/collections/components/CollectionList/CollectionList.tsx@@ -123,6 +123,7 @@ const CollectionList = withStyles(styles, { name: "CollectionList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(collection.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsxindex 8aff1808ff..b957a489a6 100644--- a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx+++ b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx@@ -159,6 +159,7 @@ const CollectionProducts = withStyles(styles, { name: "CollectionProducts" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(product.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/components/Checkbox/Checkbox.tsx b/saleor/static/dashboard-next/components/Checkbox/Checkbox.tsxindex df6fd1b7dc..63dd179890 100644--- a/saleor/static/dashboard-next/components/Checkbox/Checkbox.tsx+++ b/saleor/static/dashboard-next/components/Checkbox/Checkbox.tsx@@ -18,7 +18,9 @@ export type CheckboxProps = Omit<| "indeterminateIcon"| "classes"| "onChange"+ | "onClick"> & {+ disableClickPropagation?: boolean;onChange?: (event: React.ChangeEvent<any>) => void;};@@ -81,9 +83,9 @@ const Checkbox = withStyles(styles, { name: "Checkbox" })(className,classes,disabled,+ disableClickPropagation,indeterminate,onChange,- onClick,value,name,...props@@ -95,7 +97,14 @@ const Checkbox = withStyles(styles, { name: "Checkbox" })(centerRippleclassName={classNames(classes.root, className)}disabled={disabled}- onClick={() => inputRef.current.click()}+ onClick={+ disableClickPropagation+ ? event => {+ event.stopPropagation();+ inputRef.current.click();+ }+ : () => inputRef.current.click()+ }><inputclassName={classNames(classes.box, {diff --git a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx b/saleor/static/dashboard-next/components/ControlledCheckbox.tsxindex 8ce485c108..aef9e52e2c 100644--- a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx+++ b/saleor/static/dashboard-next/components/ControlledCheckbox.tsx@@ -20,7 +20,7 @@ export const ControlledCheckbox: React.StatelessComponent<<Checkboxchecked={checked}name={name}- onClick={() => onChange({ target: { name, value: !checked } })}+ disableClickPropagationonChange={() => onChange({ target: { name, value: !checked } })}/>}diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.tsxindex 3cd1d08c67..4aa0b39dad 100644--- a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx@@ -178,6 +178,7 @@ export const ProductList = withStyles(styles, { name: "ProductList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(product.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx b/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsxindex 6bdef683fe..5381f23f66 100644--- a/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx+++ b/saleor/static/dashboard-next/customers/components/CustomerList/CustomerList.tsx@@ -119,6 +119,7 @@ const CustomerList = withStyles(styles, { name: "CustomerList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(customer.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/discounts/components/DiscountCategories/DiscountCategories.tsx b/saleor/static/dashboard-next/discounts/components/DiscountCategories/DiscountCategories.tsxindex 606b256937..80189cf00b 100644--- a/saleor/static/dashboard-next/discounts/components/DiscountCategories/DiscountCategories.tsx+++ b/saleor/static/dashboard-next/discounts/components/DiscountCategories/DiscountCategories.tsx@@ -131,6 +131,7 @@ const DiscountCategories = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(category.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/discounts/components/DiscountCollections/DiscountCollections.tsx b/saleor/static/dashboard-next/discounts/components/DiscountCollections/DiscountCollections.tsxindex fe897e1c16..f863204dbb 100644--- a/saleor/static/dashboard-next/discounts/components/DiscountCollections/DiscountCollections.tsx+++ b/saleor/static/dashboard-next/discounts/components/DiscountCollections/DiscountCollections.tsx@@ -128,6 +128,7 @@ const DiscountCollections = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(collection.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/discounts/components/DiscountProducts/DiscountProducts.tsx b/saleor/static/dashboard-next/discounts/components/DiscountProducts/DiscountProducts.tsxindex 85d4ce93a0..3910cfad99 100644--- a/saleor/static/dashboard-next/discounts/components/DiscountProducts/DiscountProducts.tsx+++ b/saleor/static/dashboard-next/discounts/components/DiscountProducts/DiscountProducts.tsx@@ -146,6 +146,7 @@ const DiscountProducts = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(product.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx b/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsxindex 37a1c75934..54669a3f1a 100644--- a/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx+++ b/saleor/static/dashboard-next/discounts/components/SaleList/SaleList.tsx@@ -145,6 +145,7 @@ const SaleList = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(sale.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx b/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsxindex 9b836bbac9..0c8dda994c 100644--- a/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx+++ b/saleor/static/dashboard-next/discounts/components/VoucherList/VoucherList.tsx@@ -170,6 +170,7 @@ const VoucherList = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(voucher.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx b/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsxindex 79b387d498..75c89ef232 100644--- a/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx+++ b/saleor/static/dashboard-next/navigation/components/MenuList/MenuList.tsx@@ -115,6 +115,7 @@ const MenuList = withStyles(styles, { name: "MenuList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(menu.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/orders/components/OrderDraftList/OrderDraftList.tsx b/saleor/static/dashboard-next/orders/components/OrderDraftList/OrderDraftList.tsxindex 29d958fc43..8ebfde6335 100644--- a/saleor/static/dashboard-next/orders/components/OrderDraftList/OrderDraftList.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderDraftList/OrderDraftList.tsx@@ -141,6 +141,7 @@ export const OrderDraftList = withStyles(styles, { name: "OrderDraftList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(order.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsxindex e1685d1df0..c0b772ab7d 100644--- a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx@@ -154,6 +154,7 @@ export const OrderList = withStyles(styles, { name: "OrderList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(order.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx b/saleor/static/dashboard-next/pages/components/PageList/PageList.tsxindex eca265c995..dc3ac0b36c 100644--- a/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx+++ b/saleor/static/dashboard-next/pages/components/PageList/PageList.tsx@@ -117,6 +117,7 @@ const PageList = withStyles(styles, { name: "PageList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(page.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/saleor/static/dashboard-next/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsxindex 423e7a472a..99087212cb 100644--- a/saleor/static/dashboard-next/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx+++ b/saleor/static/dashboard-next/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx@@ -138,6 +138,7 @@ const ProductTypeAttributes = withStyles(styles, {<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(attribute.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx b/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsxindex 5cad3c83af..1e2fdfc5a3 100644--- a/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx+++ b/saleor/static/dashboard-next/productTypes/components/ProductTypeList/ProductTypeList.tsx@@ -117,6 +117,7 @@ const ProductTypeList = withStyles(styles, { name: "ProductTypeList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(productType.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx b/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsxindex 3a0d9fde06..6784d352de 100644--- a/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx+++ b/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx@@ -148,6 +148,7 @@ export const ProductVariants = withStyles(styles, { name: "ProductVariants" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(variant.id)}/></TableCell>diff --git a/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsxindex bd82514823..f38a21ab69 100644--- a/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx+++ b/saleor/static/dashboard-next/shipping/components/ShippingZonesList/ShippingZonesList.tsx@@ -136,6 +136,7 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(<Checkboxchecked={isSelected}disabled={disabled}+ disableClickPropagationonChange={() => toggle(shippingZone.id)}/></TableCell>