vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
732 stars 284 forks source link

initMultipleTables trows a TypeError: "tablesArray[i] is undefined" #534

Closed slaap123 closed 5 years ago

slaap123 commented 5 years ago

yadcf.initMultipleTables(tables, [ { filter_container_id: 'multi-table-filter', filter_default_label: 'Filter all tables!', column_data_type: "rendered_html", html_data_type: "text", }]);

gives a an error on the line 4296 "setOptions(tablesSelectors + '_' + column_number_str, dummyArr, tablesArray[i].table);" the i in this line comes from a for loop that is clossed on line 4293

changing the line to "setOptions(tablesSelectors + '_' + column_number_str, dummyArr);" as it was in version 9.3 fixes the issue. but if you want to keep the specifix table in the set option seround the line i a new for loop

vedmack commented 5 years ago

@slaap123 please provide a link to test case

slaap123 commented 5 years ago

Here you go, https://jsfiddle.net/z3nt6j9m/

vedmack commented 5 years ago

fixed in 0.9.4.beta.14