yadcf icon indicating copy to clipboard operation
yadcf copied to clipboard

TypeError: oTable.fnSettings is not a function

Open VictorioBerra opened this issue 11 months ago • 11 comments

Does YADCF support DataTables 2.0? fnSettings get dropped?

VictorioBerra avatar Mar 13 '24 00:03 VictorioBerra

haven't checked compatibility with the 2.0, please share a working test page (jsfiddle / etc) so I check it out

vedmack avatar Mar 14 '24 15:03 vedmack

@vedmack https://jsfiddle.net/425gmakb/1/

Your CSS is in the "CSS" tab, your JS is in the "JS" tab. At the very bottom is the sample code from your "DOM source" example.

VictorioBerra avatar Mar 14 '24 15:03 VictorioBerra

@vedmack Any thoughts on this?

The error is being thrown here: https://github.com/vedmack/yadcf/blob/master/src/jquery.dataTables.yadcf.js#L5269

Should this be this.api().settings().tables()[0].sTableId?

fnSettings is being accessed in a LOT of places. Does this all need to be changed to access settings via the public API somehow now?

VictorioBerra avatar Mar 15 '24 18:03 VictorioBerra

Here is a self-contained index.html, jsfiddle just chokes out when I try and work in it with all that code. Hope this helps.

https://gist.github.com/VictorioBerra/6b2fd02957ad430a5ce91f95087b4b4c

VictorioBerra avatar Mar 15 '24 18:03 VictorioBerra

Hi @VictorioBerra, I will check this out

vedmack avatar Apr 06 '24 22:04 vedmack

@vedmack Any luck?

VictorioBerra avatar Apr 22 '24 16:04 VictorioBerra

FWIW, all the legacy API has been removed (functions starting with fn). See https://www.datatables.net/blog/2024/datatables-2#Removed and https://www.datatables.net/upgrade/2#Removed for details.

louking avatar Apr 29 '24 10:04 louking

@VictorioBerra @louking I just pushed the 2.0.1.beta.1 although I did a lot of API adoptions to the new DT 2, there is still a lot of work to be done, so it might take some time, feel free to check it out and provide feedback https://github.com/vedmack/yadcf/blob/master/2.0/jquery.dataTables.yadcf-2.0.js I did noticed that there seems to be some issue with jquery UI filter plugins that I need to resolve

vedmack avatar May 17 '24 22:05 vedmack

@vedmack thank you!! I am looking forward to it!

VictorioBerra avatar May 17 '24 22:05 VictorioBerra

@VictorioBerra check out yadcf 2.0.1.beta.4 on https://jsfiddle.net/vedmack/8bur71tk/ test page feel free to provide additional test cases note that you should use the yadcf.init to init the filters

vedmack avatar May 19 '24 19:05 vedmack

new showcase page https://yadcf.web.app

vedmack avatar May 22 '24 19:05 vedmack