reset modal data bootstrap 4 code example
Example: bootstrap modal popup clear data
$('#yourModalName').on('hidden.bs.modal', function(event) {
$('#yourModalName').empty();
});
$('#yourModalName').on('hidden.bs.modal', function(event) {
$('#yourModalName').empty();
});