Skip to content

Commit

Permalink
🐛 Review form, fix onChange handlers (#1839)
Browse files Browse the repository at this point in the history
On the review form, fix the `onChange` handler for the following
`NumberInput` fields:
  - criticality
  - priority

Note: This fix is a follow up to the fix in #1831. A grep across the
codebase showed 2 more or the same problems.

Resolves: #1844

Signed-off-by: Scott J Dickerson <[email protected]>
Co-authored-by: Ian Bolton <[email protected]>
  • Loading branch information
sjd78 and ibolton336 authored Apr 15, 2024
1 parent 65012b8 commit 276bedd
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions client/src/app/pages/review/components/review-form/review-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,11 @@ export const ReviewForm: React.FC<IReviewFormProps> = ({
value={value}
min={1}
max={10}
onMinus={() => {
onChange((value || 0) - 1);
}}
onChange={() => onChange}
onPlus={() => {
onChange((value || 0) + 1);
}}
onMinus={() => onChange((value || 0) - 1)}
onChange={(event) =>
onChange((event.target as HTMLInputElement).value)
}
onPlus={() => onChange((value || 0) + 1)}
/>
)}
/>
Expand All @@ -247,13 +245,11 @@ export const ReviewForm: React.FC<IReviewFormProps> = ({
value={value}
min={1}
max={10}
onMinus={() => {
onChange((value || 0) - 1);
}}
onChange={() => onChange}
onPlus={() => {
onChange((value || 0) + 1);
}}
onMinus={() => onChange((value || 0) - 1)}
onChange={(event) =>
onChange((event.target as HTMLInputElement).value)
}
onPlus={() => onChange((value || 0) + 1)}
/>
)}
/>
Expand Down

0 comments on commit 276bedd

Please sign in to comment.