Editor: local editing

Editor: local editing

rldean1rldean1 Posts: 141Questions: 66Answers: 1

When a table is edited via "local editing" where is the change actually saved?

Assume the data is a static array of objects: data: ary

When a DT is initialized, does it make a separate copy of the data in data: ary, or are changes made to the actual content in the DOM?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Its written in the data object for the row in question. DataTables does not make a copy of the actual data objects, so it will effect the original objects.

    However, DataTables does not use the original container array. So in the case you mention, if you were to add an item to ary then it wouldn't be picked up after the table was initialised. But the data objects inside it should have been updated (since they are held by reference).

    Allan

This discussion has been closed.