Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using prepend duplicates the item #163

Open
ArcherEmiya05 opened this issue Jan 14, 2019 · 1 comment
Open

Using prepend duplicates the item #163

ArcherEmiya05 opened this issue Jan 14, 2019 · 1 comment

Comments

@ArcherEmiya05
Copy link

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);
}

}
}
       
@ArcherEmiya05
Copy link
Author

My goal is always put at the top every new added item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant