Closed xinli-wu closed 5 years ago
You are welcome,
Please provide a simple test page (jsfiddle)
Hello, I have the same issue and errors. In this example I have 2 filters and only 1 is using select2. Watch the console, click on either filter and you will see the error The select2('close') method was called on an element that is not using Select2. https://jsfiddle.net/Paul2167/zusvc4ra/. In this example I have 2 filters and they both use select2 and there is no error. Watch the console, click on either filter. https://jsfiddle.net/Paul2167/nxgvbr57/
I also posted this issue here: https://datatables.net/forums/discussion/53685/error-the-select2-close-method-was-called-on-an-element-that-is-not-using-select2 Thank you
@vedmack Should I post a new question? Paul
@pcapp2114 , no need in opening a new one
I get this error as well. It occurs only when enabling the scroller plugin of DataTables. With it disabled everything works as expected.
@Wouter8 please provide a jsfiddle test case
@vedmack on it.
I think this is it. https://jsfiddle.net/xpvt214o/1005405/
Should add that the error pops up in my project on clicking the select the first time. But I'm also using a lot more plugins and only disabling the scroller fixes it. So pretty sure if that gets fixed my errors will be gone too.
@Wouter8 404 That page doesn't exist.
I'm sorry. I thought it already saved when that link was in my URL bar.
This one should work: https://jsfiddle.net/oty1dewr/ @vedmack
@vedmack could you update me if you made any progress to fixing this? I'm currently buildling something for production and the scroller functionality is needed to keep the site responsive.
Thanks for the great plugin already!
@vedmack I updated the example that has the error and disabled the scroller, but I do not think this is enabled by default. I still see the erro rfor select2('close') method on the first filter that is using select2. I thought the error occurred when clicking either filter but it only happens on the first filter with the label "first" https://jsfiddle.net/Paul2167/zusvc4ra/. I read that enabling the scroller improves performance. I will most likely use this now becasue we want to load up to 3000 json items.
@Wouter8 @pcapp2114 , this was a small issue... already fixed in 0.9.4.beta.12 , until I release it you can grab it from my dropbox temp file
@Wouter8 In your example I see the error when the page first loads. I did not have to click a filter. I disabled the scroller in my example but I still get the same close method error I had before. I placed the Select2 CDN above the Yadcf CDN. https://jsfiddle.net/Paul2167/zusvc4ra/
@Wouter8 @pcapp2114 its aready fixed, see my previous comment and attached link
@Wouter8 Thanks, gonna try it out right away. Thanks for the quick fix. Amazing! :)
Working like a charm. I think this can be closed.
@vedmack Thank you. Yes 0.9.4.beta.12 Fixes the error for select2('close') method. I tested it. Is it possible to add this to jsfiddle? It only allows CDN's I don't see a way to add a custom js file.
I also enabled the scroller with the new beta 12. I don't have the other error. TypeError: Cannot read property 'appendChild' of undefined. Nice work. Thank you @vedmack
fixed in 0.9.4.beta.12, npm version published too
Thank you for your wonderful work!
I'm just having an issue with multi_select's select2 type. the columns are just strings, it gives me 4 errors in the following order after I click on the filter:
Note, I only clicked on the filter in the header once. If I click it again, it gives me another 4 errors in the above order. Selec2 is already included before yadcf.
Regards, X