Hi Goutham,
Thank you for contacting Syncfusion support.
We have checked your reported scenario “autocomplete triggers form submitting automatically upon pressing enter key”. This is default form submit behavior, when enter key is pressed in input element. It will check the validation and submit the form. Please find the document for your reference.
To prevent form submit when pressing the enter key, use the Autocomplete change event and check the event type and prevent the action. Please find the code snippet and sample for your reference.
change: function(args) {
if (args.e && args.e.type === 'keydown' && (args.e as KeyboardEvent).keyCode === 13) {
args.e.preventDefault();
}
} |
Please let us know if you need any further assistance on this.
Regards,
Prince