Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

Commit

Permalink
update pre-populating rows demo #58
Browse files Browse the repository at this point in the history
  • Loading branch information
pnowak committed Feb 14, 2018
1 parent 25161ef commit 6cd271a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tutorials/pre-populating.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="example-container clearfix">
<p>Below example shows how cell renderers can be used to present the template values for empty rows.
When a cell in the empty row is edited, the <strong>onChange</strong> callback fills the row with the template values.</p>
When a cell in the empty row is edited, the <strong>beforeChange</strong> callback fills the row with the template values.</p>

<div data-jsfiddle="example1">
<div id="example1" class="hot"></div>
Expand Down Expand Up @@ -33,7 +33,7 @@
hot1;

function isEmptyRow(instance, row) {
var rowData = instance.getData()[row];
var rowData = instance.countRows();

for (var i = 0, ilen = rowData.length; i < ilen; i++) {
if (rowData[i] !== null) {
Expand Down Expand Up @@ -72,7 +72,7 @@
beforeChange: function (changes) {
var instance = hot1,
ilen = changes.length,
clen = instance.colCount,
clen = instance.countCols(),
rowColumnSeen = {},
rowsToFill = {},
i,
Expand Down Expand Up @@ -112,4 +112,3 @@
</a>
</p>
</div>

0 comments on commit 6cd271a

Please sign in to comment.