Value get erased automatically,when typing

Tags: #<Tag:0x00007f8b28cfd9f0>

hi,
i have created the handsontable.iside that i will get some cell values and check some conditions.after that i put the value for formula caluclation.it works ,when i trying to do that for particular row.when i applying for hole rows by using for loop i faced the issue,i try to give the value on cell,it automatically get erased.second time only it takes the value.

Hi @user123

Can you share a demo that will help me to replicate the issue?

i am not able to create jsfiddle.i will explain it.

  1. if i enter the values in cell,it automatically get erased. i need to insert the same value again.that is my issue.

This behavior sounds like a bug. It may only be a default behavior if you set values via renderer not the setDataAtCell.

thanks aleksandra. but i was giving the value manually.after that i get the value ,check some condition,doing some calculation, then i put the value for result cell by setdataatcell()

So I do not have any idea what can cause this bug. Without a demo or a code snippet I won’t be able to help.

ok, i will create and let you know

1 Like

Hi @user123

how is the progress? Maybe I can share some advice.

hi,
I hold the issue,now i was facing another issue.

  1. i was craeted a function in angular2.
  2. inside that function, i am getting value for some cells using getdataatcell, and do some calculation.
  3. after set the resultvalue in some cell using setdata at cell.
  4. i call the function in html by click event binding like ( (click)=“function()” )
    its working fine.but some times it doesnot come by first click,it needs a second click.
    please,give a solution

All the implementations are different. I guess that I would need to see your code, then test it and then check what can be done to fix it.
Without a demo I only can propose to add a 50-150ms delay (setTimeout) to the function that runs on the button.

hi,
sorry for the delay reply,
i was find the reason y it doesnot come at first click
sometimes getdataatcell method doesnot get the new value.takes the old value…
code:
a = hot.getDataAtCell(0,0),
b = hot.getDataAtCell(0,1),
if(a==0 || b==0)
{
hot.setDataAtCell(1,1,0),
}
else{
hot.setDataAtCell(1,1,a),
}

this is my sample code.these all things are works fine.but sometimes it took the old value from the handsontable.that y it satisfy the wrong condition result also came erong.
please give a solution for that.

Hi @user123

Can you put it into a demo and share steps to replicate the issue? The code itself does not look suspicious.

Hi,
see the demo http://jsfiddle.net/1s0ykxnm/3/ .this is my exact coding style.
step1: enter value on both cells (0,0),(0,1).
step2: it check the condition and execute the result value.

my issue is,
sometimes that getdataatcell method takes the old data like,

  1. first i entered the value on cells 2,2 it check the condition and execute a value correctly like “some calculation”.
  2. second i entered value on cells 0,0.after the click it doesn’t take the new value 0,0.it takes the old value 2,2 only.the condition also checks wrongly.so the result came wrong like “some calculation”.but the expected result is 0. again it needs one more click to take the new value.that is my issue.

and u check that also.if u enter some value on that cells and give a click on the same cell,the old value coming.it may be the reason to coming that issue.check with this also please.

please let me know if u have any questions.
please help me to solve.

Hi @user123

I have simplified the code a little bit http://jsfiddle.net/handsoncode/7dnL5h32/ but besides that I do not see any errors.

yah, but sometimes i got the error.can i have any possibilities to stop showing the old value.when the click was triggered inside the cell.whether u checked that one.

I wasn’t able to replicate that bug. I am using Chrome 69 at Windows 10. What is your device specification?

ps. if you experience a lag in loading of the values you may try to use setTimeout() with a ~50-150ms delay.

hi aleksandra,
please check this fiddle http://jsfiddle.net/1s0ykxnm/3/
step 1: enter some value to (0,0).
step2 : click inside the(0,0) cell.it shows the old value.

i was using chrome Version 68.0.3440.106 at windows 10.

Do you close the editor with Enter? This is what I get