Fix search count
This commit is contained in:
parent
b8493d8f5c
commit
c733f0a1d8
|
@ -280,15 +280,15 @@
|
||||||
let resultCount = 0;
|
let resultCount = 0;
|
||||||
function searchCompleted() {
|
function searchCompleted() {
|
||||||
resultCount++;
|
resultCount++;
|
||||||
if (resultCount < 2 && document.getElementById("dropdown-search-list").children.length > 0) {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (resultCount == 2 && document.getElementById("dropdown-search-list").children.length == 2) {
|
||||||
document.getElementById("dropdown-search-list").innerHTML = `
|
document.getElementById("dropdown-search-list").innerHTML = `
|
||||||
<li id="deviceSearchLoader" class="dropdown-item">
|
<li id="deviceSearchLoader" class="dropdown-item">
|
||||||
<i class="bi bi-x-lg"></i>
|
<i class="bi bi-x-lg"></i>
|
||||||
<span style="margin-right: 10px">Nothing found</span>
|
<span style="margin-right: 10px">Nothing found</span>
|
||||||
</li>`
|
</li>`
|
||||||
}, 100)
|
|
||||||
}
|
}
|
||||||
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
timeoutHandler = setTimeout(async () => {
|
timeoutHandler = setTimeout(async () => {
|
||||||
|
|
Reference in a new issue