Skip to content

Commit 29c70fc

Browse files
committed
DBC22-1399: created check for payload length to perserve editing
1 parent 9275bf0 commit 29c70fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/frontend/src/Components/map/LocationSearch.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default function LocationSearch(props) {
2222
const [options, setLocationOptions] = useState([]);
2323

2424
const setSelectedLocation = payload => {
25-
window.document.activeElement.blur(); // De-focus textbox
25+
if (payload.length > 0) {
26+
window.document.activeElement.blur(); // De-focus textbox
27+
}
2628
dispatch(action(payload));
2729
};
2830

0 commit comments

Comments
 (0)