'How to update data on button click
data:{
productId: string;
Name: string;
Size: [{
id: string;
Name: string;
grade: [{
Id: string;
Name: string;
unitName: string;
Price: string;
}
{
Id: string;
Name: string;
unitName: string;
Price: string;
}]
}]
}
I am getting the above response, i have a function in which there is a button and using Flatlist I am rendering this function, now when I click on grade button i want to update the unitName and Price data according to that grade and when I click on size button i want to show only those grade which belongs to that size, please let me know how I can achieve this.
Solution 1:[1]
So If you could just share the code it would be much better but know that you can use useState to show a modal like and change the data with the onChange method
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | amirhossein delkhosh |
