Closed GauvainThery closed 8 months ago
Look at this gif. I pulled the branch to run local tests and I:
As you can see, your gender remained "Female" when it should have switched to "Male" (i.e the value stored in Notion).
Am I still missing something?
I think it's the opposite that should be done 😬 Select entries must be controlled because of the toggle from LI to Notion values.
Say we hit the toggle to switch from LI values to Notion values. Then, that simple hit must change the values of all the fields (including select entries) in the form and change the display.
That is to say that select entries are controlled and therefore, that
value
should be used, notinitialValue
(cf. this thread on stackoverflow).
We can have them controlled but it will not fix this problem as when we click the toggle we're setting back the values from LinkedIn or from Notion no matter what you did before. IMHO I find it clearer for the UX of the app - if you change the form it's to click on save right afterwards. Otherwise we would have to make it slightly differently
Fixing the problem would you mentioned would require to change the way the form is built (we'll do for sure in the future)
LGTM! Did you change your mind bc it turns out I was right, or bc you felt like this would be an endless talk? 🙃
For me both were right but the way we use the form, we might end up needing a controlled input 😉
Context
Solution
I simply removed the value prop of the input.
Priority
High