Skip to content

Commit

Permalink
adds way to delete second check line
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoferraro committed May 25, 2022
1 parent a0c919b commit 141aa9f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/src/components/AssertionForm/AssertionFormCheckList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ import * as S from './AssertionForm.styled';
interface IProps {
fields: FormListFieldData[];
assertionList: TAssertion[];

add(): void;

remove(name: number): void;

attributeList: TSpanFlatAttribute[];
}

Expand Down Expand Up @@ -77,13 +80,12 @@ const AssertionFormCheckList: React.FC<IProps> = ({fields, add, remove, attribut
>
<Input placeholder="Expected Value" />
</Form.Item>

<S.CheckActions>
<S.DeleteCheckIcon
onClick={() => {
if (index !== 0) {
CreateAssertionModalAnalyticsService.onRemoveCheck();
remove(name);
}
CreateAssertionModalAnalyticsService.onRemoveCheck();
remove(name);
}}
/>
{index === fields.length - 1 && (
Expand Down

0 comments on commit 141aa9f

Please sign in to comment.