Skip to content

Commit f67dc31

Browse files
committed
Fix docs: Add note about dt-api cell().data() writing to innerHTML
* See thread 22265
1 parent f069f87 commit f67dc31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api/cell().data().xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
This method is used to work with the data in the cell retrieved by the selector used in the `dt-api cell()` call. It can be used to get the existing data, or set a new value.
2323

2424
Note that when used as a setter, this method sets the data to apply to the table, but does not update the table's internal caches of data until the `dt-api draw()` method is called. This can be done simply as a chained method of the `dt-api cell().data()` method's returned object - for example `table.cell( 0, 0 ).data( 'Updated' ).draw();`.
25+
26+
Moreover, although the internal cache is not updated until the next draw, the change to the cell's content is visible immediately upon calling this method as a setter, as it writes to the cell's content using `innerHTML`.
2527
</description>
2628

2729
<example title="Alert the data from a cell when it is clicked upon"><![CDATA[

0 commit comments

Comments
 (0)