Closed diegoliberman closed 1 year ago
After some testing, this is happening when the tab is pressed before the loading of values is finished. For the clicking, the click in other places prevented, then, the best solution that I found for this is to do the same, to add :
if (this.isLoading()) {
event.preventDefault();
}
In the tab key handling for react-select
. This, when the tab key is pressed will "wait" until the loading of possible values is finished to allow "tabing" to the next field.
Do we agree with this solution or do you think something better can/should be done?
cc @ysbaddaden @diegoliberman
I would need to see it in action. Maybe you can show me in local?
We paired on this issue and found a way to replicate the issue easily by adding a sleep to the request. We got solutions to fix the glitch.
@leandroradusky It looks good now. When the query searching for the data is canceled, the component stops doing it, working as expected.
If you enter values "fastly" for the 4 fields, you get with a weird ux:
not found
message even when the focus has already left the field long agonot found
message for all fieldsI think we should show the
not found
message only if the user is still with the focus in the field.