From e91a9ae387aff8feb0a2af27a97c449536b13996 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 7 Nov 2023 16:50:37 +0100 Subject: [PATCH] feat(react-flow) added data-id to edges --- packages/react/src/components/Edges/wrapEdge.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/components/Edges/wrapEdge.tsx b/packages/react/src/components/Edges/wrapEdge.tsx index ad1d8f2a..750254ff 100644 --- a/packages/react/src/components/Edges/wrapEdge.tsx +++ b/packages/react/src/components/Edges/wrapEdge.tsx @@ -213,6 +213,7 @@ export default (EdgeComponent: ComponentType) => { onKeyDown={isFocusable ? onKeyDown : undefined} tabIndex={isFocusable ? 0 : undefined} role={isFocusable ? 'button' : 'img'} + data-id={id} data-testid={`rf__edge-${id}`} aria-label={ariaLabel === null ? undefined : ariaLabel ? ariaLabel : `Edge from ${source} to ${target}`} aria-describedby={isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined}