Skip to content

Commit 7fa85ae

Browse files
author
Mal Wood-Santoro
authored
Remove dropdown suggestions when reversing origin and destination (#246)
* remove suggestions when reversing origin and destination * fix linter issue
1 parent 0fb4dcc commit 7fa85ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/actions/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ export function reverse() {
244244
if (state.destination.geometry) dispatch(originPoint(state.destination.geometry.coordinates));
245245
if (state.origin.geometry) dispatch(destinationPoint(state.origin.geometry.coordinates));
246246
if (state.origin.geometry && state.destination.geometry) dispatch(fetchDirections());
247+
const suggestions = document.getElementsByClassName('suggestions');
248+
for (var i = 0; i < suggestions.length; i++) {
249+
suggestions[i].style.visibility = 'hidden';
250+
};
247251
};
248252
}
249253

0 commit comments

Comments
 (0)