Adding and Editing (note the extra spaces between to and Integer):
After:
Possible error
.trim() does not remove the whitespaces in between characters. So in the system they are saved as different titles. But the html/React automatically trims any extra white spaces between characters (unless specified using a special string), which is why the table displays both as 1 space and seem to be duplicates.
Is this considered a real problem? Idk tbh. From the users' side it will seem like a bug, but it does not affect the usability of the app.
Proposed fix
reformat by: split string > remove all empty string elements > .join(' ') > proceed with validation.
Problem
Adding and Editing (note the extra spaces between
to
andInteger
):After:
Possible error
.trim()
does not remove the whitespaces in between characters. So in the system they are saved as different titles. But the html/React automatically trims any extra white spaces between characters (unless specified using a special string), which is why the table displays both as 1 space and seem to be duplicates.Is this considered a real problem? Idk tbh. From the users' side it will seem like a bug, but it does not affect the usability of the app.
Proposed fix
reformat by: split string > remove all empty string elements > .join(' ') > proceed with validation.