Closed AnushDeokar closed 10 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
@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, The reason why we are not able to change the table name in the first attempt is because in the first attempt onChange(startCase(watchedValue)); is triggered and since the watchValue is set to collection name doing changes in the field is causing it to reset it to collection name. Therefore the tablename field seems to be uneditable in the first attempt.
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. You ofcourse cannot notice it right now in the deployment because it's not able to change the tablename in the first attempt.
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.