On change not triggered on textInput dynamically generated

Hello,

I have a component made of a text input that are generated dynamically in a list. The list represents several items and the text input the quantity.

I'd like to write in firestore each value modified by the user, each time they are modified.

The problem is the trigger "on change" is not always triggered. For example if I clic from a text input to another, only the last value I'll enter will be considered. 

I try with a shorter action that an update in firestore but the result is the same.

The video show that. Clicking the button at the bottom show the sum of an array filled thanks to the on change trigger.

  1. one text input is already setted to 12 -> sum = 12

  2. I set an other filed to 1 and clic outside -> sum = 13 (the change is considered)

  3. I fill two more fields to 1, clicking only in the text input -> sum = 14 => only one change has been taken into consideration.

Can someone explain this phenomenon and how to correct it ?

Thanks

Enregistrement de l’écran 2023-09-14 à 20.21.00.mov
2.68MB