Skip to content

Commit 128868a

Browse files
committed
fix(client): ensure number input value in TrainingForm is string
Updated the `onChange` handler in the TrainingForm component to cast number values to strings. This resolves potential type mismatch issues and improves data consistency.
1 parent 73fca69 commit 128868a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/components/Admin/OrgAdmin/Training/TrainingForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ const TrainingForm: FC<{
419419
{...field}
420420
value={field.value ?? 0}
421421
disabled={disabled}
422-
onChange={(e) => field.onChange(parseInt(e.target.value, 10) || 0)}
422+
onChange={(e) => field.onChange(String(parseInt(e.target.value, 10) || 0))}
423423
className={inputClass}
424424
type="number"
425425
min="0"

0 commit comments

Comments
 (0)