Skip to content

Commit

Permalink
Remove dropdown suggestions when reversing origin and destination (#246)
Browse files Browse the repository at this point in the history
* remove suggestions when reversing origin and destination

* fix linter issue
  • Loading branch information
Mal Wood-Santoro authored Jul 14, 2020
1 parent 0fb4dcc commit 7fa85ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ export function reverse() {
if (state.destination.geometry) dispatch(originPoint(state.destination.geometry.coordinates));
if (state.origin.geometry) dispatch(destinationPoint(state.origin.geometry.coordinates));
if (state.origin.geometry && state.destination.geometry) dispatch(fetchDirections());
const suggestions = document.getElementsByClassName('suggestions');
for (var i = 0; i < suggestions.length; i++) {
suggestions[i].style.visibility = 'hidden';
};
};
}

Expand Down

0 comments on commit 7fa85ae

Please sign in to comment.