|
Lines 78-89
Link Here
|
| 78 |
}) |
78 |
}) |
| 79 |
.filter(option => option !== null); |
79 |
.filter(option => option !== null); |
| 80 |
|
80 |
|
| 81 |
const combinedData = [...existingOptions, ...data]; |
|
|
| 82 |
|
| 83 |
let selectedValue = null; |
81 |
let selectedValue = null; |
| 84 |
let query = ""; |
82 |
let query = ""; |
| 85 |
let focusedIndex = -1; |
83 |
let focusedIndex = -1; |
| 86 |
|
84 |
|
|
|
85 |
const combinedData = [...existingOptions, ...data]; |
| 86 |
if (!combinedData?.length) { |
| 87 |
dropdownMenu.style.display = "none"; |
| 88 |
return { |
| 89 |
getSelectedValue: () => selectedValue, |
| 90 |
reset, |
| 91 |
}; |
| 92 |
} |
| 93 |
|
| 87 |
// Setup input attributes |
94 |
// Setup input attributes |
| 88 |
input.setAttribute("placeholder", placeholder); |
95 |
input.setAttribute("placeholder", placeholder); |
| 89 |
input.setAttribute("aria-expanded", "false"); |
96 |
input.setAttribute("aria-expanded", "false"); |
| 90 |
- |
|
|