How to prevent form submission when choosing a location to react-google-places-suggest?

There is a select to select the locations ITmB_3NXRTC55eXg7_UcIQ.png he is in form when pressing the enter choose the location the form is submitted, preventDefault does not work, the game with a keyCode, too, the form still flies to the server, how to prevent it in the normal way?
June 14th 19 at 18:18
1 answer
June 14th 19 at 18:20
Perhaps the form has the onSubmit event. Delete it, and make the form submission only via onClick on the submit button.
ehh, it was all so easy, I wouldn't be asking here :D - Darlene commented on June 14th 19 at 18:23
, ehh, if the source code were made, guessing would not have had. Here and easier there are asking ^^ - dannie.Stehr commented on June 14th 19 at 18:26
obviously , something has caused the form submit, dig in this direction, there put debugger in the code where the enter key was trying to catch and see step by step. - dannie.Stehr commented on June 14th 19 at 18:29
, https://medium.com/@ericclemmons/react-event-preve... - Darlene commented on June 14th 19 at 18:32
one may wonder who will - Darlene commented on June 14th 19 at 18:35

Find more questions by tags JavaScriptReact