The following api call
autoCompleteJS.select(0);
is throwing a TypeError
Uncaught TypeError: Cannot set properties of undefined (setting 'event')
To reproduce just enter the api call at the end of the official codepen example:
https://codepen.io/tarekraafat/pen/rQopdW