@yaser1999yaser calling refresh is actually the best way to handle this. Since you are filtering the database you might have to refilter the data after refreshing the database. You could try abstracting your filter queries into a standalone function that is called once on page load and then again when a new item is added.