Skip to content

Mouse focus will disappear #17263

@mjchangulead

Description

@mjchangulead

Hello,
Thanks for this nice libray.
However, I encounter a problem: a text input implments your libray, which will loose focus after the user inputs any text.
The following is my simple code:

function addressLookupAutocomplete(inputField: HTMLInputElement): void {
if (null === inputField || 1 > actioncode || 2 < actioncode) {
console.error("invalid params");
return;
}

 const awesomplete = new Awesomplete(inputField, {
    minChars: 1,
    maxItems: 5
  });
  
  const zipCodes = ["10001", "20002", "30303", "90210", "60606"];
  const filtered = zipCodes.filter(zip => zip.startsWith(inputField.value));
awesomplete.list = filtered;

}

Could you help on this?
Thanks

Best regards,
Mei

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions