Skip to content

Commit

Permalink
🐛 Review form, fix onChange handlers (#1839) (#1848)
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 of the same problems.

Resolves: #1844
Backport-of: #1839

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
Co-authored-by: Ian Bolton <ibolton@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
  • Loading branch information
konveyor-ci-bot[bot] and ibolton336 authored Apr 15, 2024
1 parent 21d95f6 commit c3267ab
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 c3267ab

Please sign in to comment.