-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed function responsible for trimming leading zeros. #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes.
@@ -16,8 +16,14 @@ const BoardForm = ({ onSubmit, renderActions, boardId, ...initialFormValues }) = | |||
const validationSchema = createValidationSchema(boardId, boards); | |||
const {values, handleChange, handleSubmit, errors} = useFormData(initialFormValues, validationSchema, true); | |||
|
|||
const numberInputHandler = (event) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the name to handleNumberInput or handleInput according to convention.
|
||
export const trimLeadingZeros = (event) => { | ||
const inputValue = event.target.value; | ||
export const trimLeadingZeros = (inputValue) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it to oneliner => String(parseInt(inputValue)). In my opinion it is clear what parseInt is doing, so it will be readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve conflicts and merge
…r/triming-zeros # Conflicts: # cogboard-webapp/src/helpers/index.js
No description provided.