After filtering the records and autofill data not working as expected

Tags: #<Tag:0x00007f8b267b1318>

Hi @aleksandra_budnik

I'm populating 11 records with empty rows into handson table after filtering (removed blank)

image

after that draging “adipiscing” to the end of the rows
image

after removing filter values are populated in empty rows also. My intention is to populate values only on filtered columns

image

JsFiddle Link : https://jsfiddle.net/sathishvenkatesan/k9j82tdg/

Note : using Handson 8.0.0
can someone help to solve the issue. Thanks

Hi @sathish.venkatesan

You modify source data by reference in the following function.

function AutoFillValue(start,end){
  console.log(hot.toPhysicalRow(start.row))
   let physicalStartRow = hot.toPhysicalRow(start.row);
   let physicalEndRow = hot.toPhysicalRow(end.row);
   let sourceData = dataObj[start.row -1]
   
   let sourceColData = sourceData[start.col];
   console.log("sourceData",sourceColData)
   for (let k = physicalStartRow; k <= physicalEndRow; k++) {
       dataObj[k][start.col] = sourceColData;
    }
    console.log("dataObj",dataObj)
} 

If I comment out that fragment of code, the Autofill plugin works correctly.

@piotr.laszczkowski yes if i don’t use custom function it’s working fine. But i need to perform some logical operation on source data(dataObj). Hence i need to use AutoFillValue function. Can you suggest some other solution to solve this issue

On the forum, we can only suggest some solutions or verify if the reported problem is a bug in Handsontable. We both agreed the problem lies in your customization.

Creating custom solutions on demand is a part of our consulting services. Please reach out to our sales team at sales@handsontable.com to ask about available consulting options or support plans covering the client’s code review.