Skip to content

Commit

Permalink
🐛 Review form, fix onChange handlers
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 konveyor#1831.  A grep
across the codebase showed 2 more or the same problems.

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Apr 11, 2024
1 parent 0c7cd84 commit 1826000
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 1826000

Please sign in to comment.