Im using real time database and listen to every new added item.
My array contains only 2 item, but it re-display an item which is the first item.
How to properly implement prepend() in dynamic content?
function someFunction(){
const reports = [];
const clusterize1 = new Clusterize({
scrollId: 'scroll-area1',
contentId: 'content-area1'
});
//fetch from db
foreach(){
if(newAddedItem){
reports.push(some tags);
clusterize1.prepend(reports);
}
}
}
Im using real time database and listen to every new added item. My array contains only 2 item, but it re-display an item which is the first item. How to properly implement prepend() in dynamic content?