How to use shared default parameters for keeping order in DataTables?

How to use shared default parameters for keeping order in DataTables?

spanspan Posts: 1Questions: 1Answers: 0
edited June 2015 in Free community support

I have a DataTable that can have N number of children DataTable(s) that can be added/removed/recreated at any time. I would like the children to share initialization parameters but it seems that DataTables affect the original data structure.

When adding two children and sorting the first one, the second child will inherit the sorting when recreated. I have created a fiddle here: http://jsfiddle.net/wthY9/44/

Steps:

  1. Add two children
  2. Sort first child on any column
  3. Recreate the second child with the recreate button
  4. Second child have inherited the ordering (debugging shows that the default childParameters now have ordering set instead of being an empty Array).

How can I recreate children and keep the sort order for the child being recreated?

Note that there is also a post on this on StackOverflow with a bounty: http://stackoverflow.com/questions/30645500/datatables-shared-parameters-affected-by-sorting

This discussion has been closed.