-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tests-for-setting-balance-and-exporting-gift…
…-cards
- Loading branch information
Showing
9 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
Fix "TypeError: Cannot read properties of undefined (reading '0')" error thrown by datagrid by stop propagating events from RadioGroup component in ChannelsAvailability. RadioGroup fires couple events at onec and datagrid listing to global onClick event, that cause error in datagrid. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
Add "ResizeObserver loop limit exceeded" to ignored in Sentry. Error is thrown only during Cypress tests that will be soon migrated and we could remove error from ignored. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
Add "ResizeObserver loop completed with undelivered notifications" to ignored in Sentry. |
9 changes: 2 additions & 7 deletions
9
src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
RadioGroup as RadioGroupBase, | ||
RadioGroupRootProps, | ||
} from "@saleor/macaw-ui-next"; | ||
import React from "react"; | ||
|
||
import { StopPropagation } from "../StopPropagation"; | ||
|
||
const RadioGroupRoot = (props: RadioGroupRootProps) => { | ||
// StopProgation is used here to block onClick events from RadioGroup that cause throw error in datagrid | ||
// Datagrid listing for all on click event but RadioGroup emitated couple events at onced | ||
// Radix issue: https://github.com/radix-ui/primitives/issues/1982 | ||
return ( | ||
<StopPropagation> | ||
<RadioGroupBase {...props} /> | ||
</StopPropagation> | ||
); | ||
}; | ||
|
||
export const RadioGroup = Object.assign(RadioGroupRoot, { | ||
Item: RadioGroupBase.Item, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./RadioGroup"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
interface StopPropagationProps { | ||
children: ReactNode; | ||
} | ||
|
||
// If you don't want to click events bubble in the DOM tree, you can use this component. | ||
export const StopPropagation = ({ children }: StopPropagationProps) => { | ||
const stopPropagation = (e: React.MouseEvent) => e.stopPropagation(); | ||
|
||
return <div onClick={stopPropagation}>{children}</div>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./StopPropagation"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters