# View error not updating when user interaction

**URL:** <https://forum.ionicframework.com/t/view-error-not-updating-when-user-interaction/119163>\
**Category:** ionic-v3\
**Created:** [January 23, 2018, 5:03pm UTC](https://forum.ionicframework.com/t/view-error-not-updating-when-user-interaction/119163 "2018-01-23T17:03:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoguima94](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@leoguima94](https://forum.ionicframework.com/u/leoguima94)\
**Post date:** [January 23, 2018, 5:03pm UTC](https://forum.ionicframework.com/t/view-error-not-updating-when-user-interaction/119163/1 "2018-01-23T17:03:56Z")

</div>

## Problem with Form (Data driven)

I have an array of objects (dashed block in the gif) that builds the view. The GIF below shows the error:

 ![bug_ionic](https://global.discourse-cdn.com/ionicframework/original/3X/a/3/a3b9624518c2c237ef65b20626b5b8cc4cc89ee3.gif)

Each dashed block is a iteration of `*ngFor="let price of priceOptionsList;let pr = index;"` directive.

This is the object model:

```json
{
    value ? : number,
    description : string,
    beginDate : string,
    endDate : string,

    periodActivated : boolean
}

```

The button `PERÍODO DE VIGÊNCIA` changes the boolean value of `periodActivated`, that shows date/time inputs.

The button `ADICIONAR VALOR` adds an object in the array:

```javascript
this.priceOptionsList.push({
	"value" : undefined, // In the view, it's displays the value of the position [0], error!
	"beginDate" : '',
	"endDate" : '',
	"description"	: '',
	"periodActivated" : false
});

```

When I click in the buttons, the view changes and not display the value in some inputs (see gif, description and date/time inputs get empty), but the model is the same, there is no changes!

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/e/8/e848c25aee1ef36196aa25c98f7134ea1f579b29.png)

I think it is a BUG, I am correct?

---

<div class="post-metadata">

**Author:** ![leoguima94](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@leoguima94](https://forum.ionicframework.com/u/leoguima94)\
**Post date:** [January 24, 2018, 8:41pm UTC](https://forum.ionicframework.com/t/view-error-not-updating-when-user-interaction/119163/2 "2018-01-24T20:41:00Z")

</div>

Solution found!

```auto
<div *ngFor="...; let i = index;">
    <ion-input [(NgModel)]="variable" [name]=" 'namehere' + i ">
</div>

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:54pm UTC](https://forum.ionicframework.com/t/view-error-not-updating-when-user-interaction/119163/3 "2021-07-19T21:54:04Z")

</div>

Closed on July 19, 2021, 9:54pm UTC


