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

YADCF 0.8.9 and DataTable 1.10 Destroy broken with multiples tables #293

Closed
Sephyria opened this issue Mar 2, 2016 · 2 comments
Closed
Labels

Comments

@Sephyria
Copy link

Sephyria commented Mar 2, 2016

Hi,

I've a "little" bug with YADCF.
Multiples tables init like this

    var table1 = $('#table1').Datatable();
    var table2 = $('#table2').Datatable();
    yadcf.init(table1, ...);
    yadcf.init(table2, ...);

=> Everything fine :) (two tables for exemple)
But, when I try to destroy the first table :

$("#table1").DataTable().destroy();

All the tables are "yadcf destroy" (Datatables is ok, the sorter is available in the second table)
In the code of Yadcf, I can see that :

$('.yadcf-filter-wrapper').remove();

In the function removeFilters()
I think it's the problem :) but I don't know how to solve it !

table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly2(table_arg);

Somethings like this ?

@Sephyria
Copy link
Author

Sephyria commented Mar 2, 2016

A little patch "home made" :

$(".yadcf-datatables-table--" + oTable.selector.replace('#', '') + ' .yadcf-filter-wrapper').remove();`

@vedmack vedmack added the bug label Mar 2, 2016
vedmack added a commit that referenced this issue Mar 3, 2016
@vedmack
Copy link
Owner

vedmack commented Mar 3, 2016

Fixed in 0.9.0.beta.10

@vedmack vedmack closed this as completed Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants