Query on default value for number field

I have number input field which has a default value set based on the selected row of the table. And the source for table is a query which loads periodically. Due to periodic query execution, the table refreshes and subsequently the default value for the number input field also changes. I am fine until this. However, I do not want the number input field to get changed due to refresh once I start editing it. Request help with this.

If you are only going to want to keep that default value once you begin editing it, you can store the value in a temporary state and use it at a later time even if the table reloads (so long as the selectedRow is unselected when the table reloads then the data in the field/selectedRow/temp variable should remain the same)

1 Like

Another idea with temporary state is to use a variable that tracks whether the number input is edited (I'm calling my variable isEdited)

On change of the number input, I have this event:

Then, on my number input, I have no default value, but the table has this event: