I have a component and I repeat this component based on the data fetched by db. It is a sales tool and fetch companies information. For each repeated component I change the status.
leads:
- (1 position) apple: status: "new"
- (2 position) microsoft : status: "new"
- (3 position) tesla. : status: "new"
For the second position, I'm changing the status. The status is included in the component "lead", the status it self is a component with variables.
I'm editing the status of to the lead Microsoft:
- (1 position) apple : status: "new"
- (2 position) microsoft : status: "Prospect"
- (3 position) tesla. : status: "new"
I'm working on the lead and I'm not saving it because I want to continue after adding the new lead (i'm not refreshing the page).
Now, without refreshing the page I'm adding a new lead.
Leads:
- (1 position) Intel: status "new"
- (2 position) apple: status: "prospect"
- (3 position) microsoft : status: "new"
- (4 position) tesla. : status: "new"
Adding the new lead means recalling the API Lead loading.
Where is the issue?
The API Lead loading fetch the correct information from the DB:
- (1 position) Intel: status "new"
- (2 position) apple: status: "new"
- (3 position) microsoft : status: "prospect"
- (4 position) tesla. : status: "new"
but on the repeated item I have:
- (1 position) Intel: status "new"
- (2 position) apple: status: "prospect"
- (3 position) microsoft : status: "new"
- (4 position) tesla. : status: "new"
What is happening is that the variable doesn't reset the value as it should because was rendered again the component, but stay with the previous value and stay for the position 2 of the rendered items, even if it should go down on position 3.
This is happening because on loading of the component I'm not reseting the variables values or is more something that it should be seen from toddle side?