Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix event propagation
dominik-zeglen8251eca14de5
diff --git a/saleor/static/dashboard-next/attributes/components/AttributePage/AttributePage.tsx b/saleor/static/dashboard-next/attributes/components/AttributePage/AttributePage.tsxindex 4522290f53..e239f54cc2 100644--- a/saleor/static/dashboard-next/attributes/components/AttributePage/AttributePage.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributePage/AttributePage.tsx@@ -26,7 +26,7 @@ export interface AttributePageProps {onDelete: () => void;onSubmit: (data: AttributePageFormData) => void;onValueAdd: () => void;- onValueDelete: (id: string, event: React.MouseEvent<any>) => void;+ onValueDelete: (id: string) => void;onValueUpdate: (id: string) => void;}diff --git a/saleor/static/dashboard-next/attributes/components/AttributeValues/AttributeValues.tsx b/saleor/static/dashboard-next/attributes/components/AttributeValues/AttributeValues.tsxindex 2c2d7148e4..e46bfaa43b 100644--- a/saleor/static/dashboard-next/attributes/components/AttributeValues/AttributeValues.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributeValues/AttributeValues.tsx@@ -14,14 +14,14 @@ import * as React from "react";import CardTitle from "../../../components/CardTitle";import Skeleton from "../../../components/Skeleton";import i18n from "../../../i18n";-import { maybe, renderCollection } from "../../../misc";+import { maybe, renderCollection, stopPropagation } from "../../../misc";import { AttributeDetailsFragment_values } from "../../types/AttributeDetailsFragment";export interface AttributeValuesProps {disabled: boolean;values: AttributeDetailsFragment_values[];onValueAdd: () => void;- onValueDelete: (id: string, event: React.MouseEvent<any>) => void;+ onValueDelete: (id: string) => void;onValueUpdate: (id: string) => void;}@@ -95,7 +95,7 @@ const AttributeValues: React.FC<AttributeValuesProps> = ({<TableCell className={classes.iconCell}><IconButtondisabled={disabled}- onClick={event => onValueDelete(value.id, event)}+ onClick={stopPropagation(() => onValueDelete(value.id))}><DeleteIcon color="primary" /></IconButton>