Phone number Input Component not picking Country code automatically

Update: I added a modal to the painting and I'm able to reproduce this issue.

Here are my findings:

If the event handler that opens the modal runs on success of the REST API query, there's a race condition, the value updates correctly but the flag does not:

However, if the event handler that opens the modal runs on row selection:

The tradeoff is that the Modal will show the previous phone number while the query is running.

I'm joining Office Hours right now. Feel free to join us we so can debug this live. Otherwise, I'll find a way to prevent this race condition afterwards.

1 Like