An agile planning application that tracks tasks, ideas and nutrition goals. This app is designed to assist with everyday productivity, progress tracking and fitness.
1
stars
0
forks
source link
local storage updates correctly on new ui creations for the description. But description doesn't update properly when editing an already created ui. #62
Whenever I click on the Add another button it generates a new ui like id expect. Whatever I enter into the description text properly updates in the console log and on the local storage, letting me know that the states are working as intended. The problem is that after making multiple ui, if I try to edit a previously made ui it doesn't update that particular description field. Instead, it updates the the current/most recent ui's description field.
To Reproduce
Steps to reproduce the behavior:
Go to Add another
Click on the button 3-4 times and give each their own description in the text entry. Then go back to any previous ui and edit the description.
Scroll down to local storage
See error the local storage isn't editing the state of the ui selected. Instead, it is editing the most recent ui description text.
Expected behavior
Editing UI that's already been generated should update the state of that particular ui - specifically the description. The changes reflect properly on the UI themselves. But the local storage should also reflect these same changes. So that the state of each ui is stored properly even after having the descriptions changed.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
The variables inputValue is a state that pulls in the value of the description text. Then I use a stage variable to take the previous state of stageTest (which holds props as its value) and manually add in the props.description to the new stage using ...
Key variables to keep an eye on are
stageTest
stage
And inputValue.
Describe the bug
Whenever I click on the Add another button it generates a new ui like id expect. Whatever I enter into the description text properly updates in the console log and on the local storage, letting me know that the states are working as intended. The problem is that after making multiple ui, if I try to edit a previously made ui it doesn't update that particular description field. Instead, it updates the the current/most recent ui's description field.
To Reproduce Steps to reproduce the behavior:
Expected behavior Editing UI that's already been generated should update the state of that particular ui - specifically the description. The changes reflect properly on the UI themselves. But the local storage should also reflect these same changes. So that the state of each ui is stored properly even after having the descriptions changed.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context The variables inputValue is a state that pulls in the value of the description text. Then I use a stage variable to take the previous state of stageTest (which holds props as its value) and manually add in the props.description to the new stage using ...
Key variables to keep an eye on are stageTest stage And inputValue.