Fixed issue that causes no bonds found message to be displayed even when bonds are found
This commit is contained in:
sairaj mote 2021-04-28 20:27:04 +05:30
parent 548e5465d1
commit d411b4ddac

View File

@ -9936,17 +9936,18 @@ Bitcoin.Util = {
for(child of getRef('bond_list').children){ for(child of getRef('bond_list').children){
if(child.dataset.floId.toLowerCase().includes(getRef('search_bonds').value.toLowerCase())){ if(child.dataset.floId.toLowerCase().includes(getRef('search_bonds').value.toLowerCase())){
child.classList.remove('hide-completely') child.classList.remove('hide-completely')
hiddenElements++
} }
else{ else{
child.classList.add('hide-completely') child.classList.add('hide-completely')
hiddenElements++
} }
} }
console.log(hiddenElements, getRef('bond_list').children.length)
if(hiddenElements === getRef('bond_list').children.length){ if(hiddenElements === getRef('bond_list').children.length){
getRef('bond_list__empty-state').classList.add('hide-completely') getRef('bond_list__empty-state').classList.remove('hide-completely')
} }
else{ else{
getRef('bond_list__empty-state').classList.remove('hide-completely') getRef('bond_list__empty-state').classList.add('hide-completely')
} }
}, 100) }, 100)
}) })