I have some objects with two properties, name and tags, that simulate being files. Then I use a data table to display them. The thing is like this: The problem : I have a drawData function that makes me appear the tablar. But when I add new data, which simulate being new files with their tags and I call the function again, the image is not updated, that is, it does not show me the new "files" I have entered. The function that is responsible for drawing the table is this:
function drawData(){
$(document).ready(function() {
$('#example').DataTable( {
data: dataSet,
columns: [
{ title: "FileName" },
{ title: "Tags" },
]
} );
} );
}
Does anyone know how I can refresh the graphics in my table so that new data appears?