Skip to content

Commit 50f77e7

Browse files
Use Fragment to add key to map output
1 parent 09a8d29 commit 50f77e7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

extensions/ql-vscode/src/view/model-editor/MethodRow.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ import {
44
VSCodeProgressRing,
55
} from "@vscode/webview-ui-toolkit/react";
66
import * as React from "react";
7-
import { forwardRef, useCallback, useEffect, useMemo, useRef } from "react";
7+
import {
8+
Fragment,
9+
forwardRef,
10+
useCallback,
11+
useEffect,
12+
useMemo,
13+
useRef,
14+
} from "react";
815
import { styled } from "styled-components";
916
import { vscode } from "../vscode-api";
1017

@@ -195,7 +202,7 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
195202
)}
196203
{!props.modelingInProgress &&
197204
modeledMethods.map((modeledMethod, index) => (
198-
<>
205+
<Fragment key={index}>
199206
<DataGridCell>
200207
<ModelTypeDropdown
201208
method={method}
@@ -246,7 +253,7 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
246253
)}
247254
</DataGridCell>
248255
)}
249-
</>
256+
</Fragment>
250257
))}
251258
</DataGridRow>
252259
);

0 commit comments

Comments
 (0)