Use react fragment with key property in loop

[MAILPOET-3469]
This commit is contained in:
Jan Lysý
2021-06-09 16:15:59 +02:00
committed by Veljko V
parent f3bd457c3a
commit 5035fc0f33

View File

@@ -106,7 +106,7 @@ export const Form: React.FunctionComponent<Props> = ({
</Heading>
<ConditionType />
{Array.isArray(filterRows) && filterRows.map((filterRow, index) => (
<>
<React.Fragment key={filterRow.index}>
<Grid.ThreeColumns>
{filterRows.length > 1 && (
<a
@@ -143,7 +143,7 @@ export const Form: React.FunctionComponent<Props> = ({
)}
</Grid.ThreeColumns>
<FilterSeparator index={index} />
</>
</React.Fragment>
))}
<Button
type="button"