"hot.getDataAtCell()" on Summary get previous value instead of current

Hello Admin,

I have this setup on my “customFunction” for summary

{
  sourceColumn: 8,
  type: 'sum',
  destinationRow: hot.countRows() - 2,
  destinationColumn: 8,
  ranges: [[1, hot.countRows() - 3]]
  forceNumeric: true,
},
{
  sourceColumn: 8,
  type: 'custom',
  destinationRow: hot.countRows() - 1,
  destinationColumn: 8,
  ranges: [[1, hot.countRows() - 3]],
  forceNumeric: true,
  customFunction(endpoint) {
       var itemSubTotal = hot.getDataAtCell(endpoint.destinationRow - 1, 8);

       return itemSubTotal ;
  }
}

However the hot.getDataAtCell() only get previous data instead of current/updated data…

Please see the “Total” on Column “Nilai” from the demo bellow:
handsontable.mp4 [video-to-gif output image]

How to get the current/update data?

Thank you

Hi @simpleminimalis

Thank you for contacting us. It seems that the image you uploaded doesn’t work. Can you please send a code demo in chosen sandbox (like StackBlitz or jsFiddle) where the problem can be replicated?

Hi @adrian.szymanski

Here is the jsFiddle link Handsontable Error - JSFiddle - Code Playground

Hi @simpleminimalis

Thank you for the example. Can you please provide the steps to reproduce the issue? I can’t edit any cells and I’m not sure what’s your expected output.

Hi @adrian.szymanski

You can use the check box to change the value…
On customFunction script as i write the example on my first post you can see the value of “Total” summary on column 8 is refer to “Sub-Total” of the column 8

but as you can see and try, when you change the value by click the check box… based on the script “return itemSubTotal ;”…The “Total” summary on column 8 should be equal to “Sub-Total” of the column 8 …but instead of show current value of “Sub-Total” it show the previous result of the “Sub-Total”…

Hi @simpleminimalis

I see, in that case it would require a more in-depth code review which I can’t do without the knowledge about your current support plan. Please, share your license ID at support@handsontable.com so I can check you support level.