function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vivek NayakVivek Nayak 

Handle keycode 38 & 40 in autocomplete search box.

Hi All,
I have one autocomplete search functinality which shows a result list based on user input. I have used ui:input text for search box but problem is it doesnt handle up arrow/down arrow automatically like lightning:input.
I want when user start typing in box--> search result appear--> on pressing up (keycode 38) focus should move up and ressing down focus should move down with result list. This is really urgent.
Any help would be appreciated.

I have wriiten below part in controller for handling this.

var keycode=event.getParams.KeyCode;

switch (keycode) {
case 38:
// logic

break;

case 40:
}

Thanks