Mouse focus will disappear
Author: mjchanguleadCreated May 20, 2025Updated May 20, 2025
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
Source: nudeui/awesomplete