vedmack / yadcf

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

Filter client side doesn't work when we have a column with checkboxes #685

Closed XapAbb closed 1 month ago

XapAbb commented 1 month ago

Hi, I think it's a bug but I apologize in advance in case I made a mistake when using the library.

When we have a dummy column created to host the checkboxes, the filter takes the wrong column as an index and therefore also the wrong value to compare.

https://jsfiddle.net/1fmwoq73/9/

im' using Datatables 1.10.11 and yadcf 0.9.4

Thanks.

XapAbb commented 1 month ago

Resolved using the "column_number_data" property to specify the real column. (it's not documented, i debugged the code to find this, but still is strange other type of filters doesn't need this.)

yadcf.init(t, [ { column_number: 1, filter_type: "text" }, { column_number: 5, filter_type: "range_number", filter_delay: 500, filter_reset_button_text: false, column_number_data: "4" },]);

vedmack commented 1 month ago

Thanks for updating me about it, I will try to add the needed documentation in the meanwhile, can u please add "working jsfiddle"

thx

XapAbb commented 1 month ago

Here https://jsfiddle.net/vLj9hyst/

thx to you for the plugin.