Datatables 2 data attributes processing change

Datatables 2 data attributes processing change

scoldwellscoldwell Posts: 3Questions: 0Answers: 0
edited April 26 in Free community support

Link to test case:
Datatables 1.x: https://live.datatables.net/mibekuvo/1/edit
Datatables 2.x: https://live.datatables.net/xoyahanu/1/edit

Description of problem:
In datatables 1.x we were able to specify data attributes in the html that would get processed prior to stateLoadCallback being triggered. This has changed in datatables 2.x as shown in the test cases' console output. This makes it really difficult to execute logic needed for loading the state that is dependent on any data attributes that may be specified on the column headers. In addition, the header() method on the column throws an error if called in stateLoadCallback. I have found some ugly workarounds (by getting the table node and using css selectors to get the header nodes), but this is not ideal.

Replies

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    Interesting one. That wasn't an intention coming out of the change that was made in that area. I'll need to make some time to see if I can rectify it. I'll try to do so next week. Thanks for flagging this up.

    Allan

  • scoldwellscoldwell Posts: 3Questions: 0Answers: 0

    Thanks, Allan!

  • scoldwellscoldwell Posts: 3Questions: 0Answers: 0

    Would you like me to write up an issue in github?

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    No - just here is fine thank you. No need for duplication :)

    Allan

Sign In or Register to comment.