Table name textbox UI error fix#1412
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
|
@AnushDeokar is attempting to deploy a commit to the Rowy Team on Vercel. A member of the Team first needs to authorize it. |
|
@AnushDeokar the watchvalue is collection as the table name defaults to the collection name with case corrected form if nothing else is mentioned. The bug here is that the Text box was not editable on first attempt however is editable after another field like description is edited. |
|
Hey @harinij, However, when we switch field to some other field and comback(let's name it as second attempt) to edit the tablename it works because this time onChange((value.trim()); is triggered which works as expected. Another reason why keeping watchfield equal to collection does not seems to be logical because consider the following case:
Changing the collection name to 'name' will fix this bug. Changes made in this PR works perfectly fine and as expected. Please let me know if I am wrong at any point or If you want to this bug to be fixed in any other way. |
|
Why did I add a startcase in value.trim()? Now let's say I am also able to edit the table name in the first attempt. Another change I made is changing onChange(value.trim()) to onChange(startCase(value.trim())) because in the first attempt when I am trying to change the name the case correction is done but when you switch your focus to description and again comback to change tablename the case correction will not be performed. |
closes #1409
It was watching the wrong field i.e. collection due to which the watchvalue will always be equal to the collection name.
Also, I have added consistency in the startCase through which if you switch your input focus and comeback again on tablename field the startCase consistency would be maintained.