You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When entering non-numeric characters in the allotted hours input field, the field value becomes NaN (Not a Number) and remains stuck in this state. Once NaN appears, the field cannot be cleared or updated with new values, even when attempting to backspace or enter valid numbers. This creates a blocking user experience where the only way to recover is to refresh the form.
To Reproduce
Steps to reproduce the behavior:
Login as a admin or superadmin
Navigate to action items
Try to create a action item
type a letter in the allotted hours section.
Expected behavior
1.When non-numeric characters are entered, the field should either prevent the input or maintain its previous valid value
2.Users should be able to clear the field and enter new values at any time
3.The field should never display NaN to end users
4.Invalid inputs should be handled gracefully without getting the field stuck in an unrecoverable state
Actual behavior
1.Entering a letter or non-numeric character causes the field value to become NaN
2.Once NaN appears, the field becomes unresponsive to new inputs
3.Backspace and delete operations fail to clear the NaN value
4.The field remains stuck in an invalid state until form refresh
Screenshots
Additional details
Root cause appears to be in the handleFormChange function where NaN values are being stored in the form state without proper validation. The current implementation doesn't properly sanitize numeric inputs before updating the state, leading to this persistent error state.
I have resolved this error on my local machine and am ready to raise a PR for this.
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
Describe the bug
When entering non-numeric characters in the allotted hours input field, the field value becomes NaN (Not a Number) and remains stuck in this state. Once NaN appears, the field cannot be cleared or updated with new values, even when attempting to backspace or enter valid numbers. This creates a blocking user experience where the only way to recover is to refresh the form.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
1.When non-numeric characters are entered, the field should either prevent the input or maintain its previous valid value
2.Users should be able to clear the field and enter new values at any time
3.The field should never display NaN to end users
4.Invalid inputs should be handled gracefully without getting the field stuck in an unrecoverable state
Actual behavior
1.Entering a letter or non-numeric character causes the field value to become NaN
2.Once NaN appears, the field becomes unresponsive to new inputs
3.Backspace and delete operations fail to clear the NaN value
4.The field remains stuck in an invalid state until form refresh
Screenshots
Additional details
Root cause appears to be in the handleFormChange function where NaN values are being stored in the form state without proper validation. The current implementation doesn't properly sanitize numeric inputs before updating the state, leading to this persistent error state.
I have resolved this error on my local machine and am ready to raise a PR for this.
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: