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'm working in changes to the /yourschool page that will add the ability to search for your school and then highlight that school on the map. The school you find via the search will also be set as the selection of the dropdown in the census form on the page. This requires three new features:
onChange
function. I've also added lat/long into the data returned by the API. This is to avoid making another API call to reload the same data.loadOptions
function passed intoVirtualizedSelect
is only called when the component is initially constructed and when the user types into the field. It is not called when thevalue
prop gets a new value. That means that if you setvalue
to something that has not already been returned byloadOptions
then it won't select anything (since that isn't in the list of loaded options.) However, if you setvalue
to a full option object then it will be used and that option will be selected. In order to set the value of the dropdown in the census form based on the selection from the map dropdown I need to be able to pass a full option.