excel-bootstrap-table-filter icon indicating copy to clipboard operation
excel-bootstrap-table-filter copied to clipboard

Add destroy method

Open Simone4e opened this issue 4 years ago • 0 comments

Hello @chestercharles ,

Is possible add a destroy method for kill the plugin? I created this method to delete but it seems to me to be wrong.

function ActiveFilter() {
    DeleteFilter();
    var table = document.querySelectorAll('table');
    $(table).each(function (index) {
        $(this).excelTableFilter({
            columnSelector: '.filtra',
            sort: false,
            search: true
        });
    });
}
function DeleteFilter() {
    var dropdowns = document.querySelectorAll('.dropdown-filter-dropdown');
    dropdowns.forEach(function (dropdown) {
        if (dropdown) {
            dropdown.remove();
        }
    });
}

Best regards

Simone4e avatar Apr 12 '21 12:04 Simone4e