Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was able to fix the zip search lag!
The issue was that the child component was running a search in the time it took for the parent component to pass in the new 'disabled' state.
Moving the all of the zip logic (including the input box itself) down into the child component directly ties it to the search and allows the child component to manage its own disabled state. I didn't alter any of what is in the input or its label- it was a direct copy/paste.
I added a comment, moved a constant further up in the component and renamed a couple things to hopefully be more clear!
How I know this works:
I no longer see any console logs for failed zip search calls. This means we aren't calling it any extra times! I can also search a bunch of zip codes, delete digits, add them back in, and the dropdown has been populated every time. But I'd love for another developer to checkout this branch and try the same gut checks.
Screen.Recording.2024-05-02.at.2.25.24.PM.mov
(the experiment url to add is ?enableExperiments=school_association_v2)
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: