You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Area drop down in the Seeding Input form contains duplicates. The same list of areas appears to be being appended to the dropdown multiple times. Each Area should appear in this list only one time.
Steps to Reproduce
Clear browsing data
Visit Seeding Input form
Area's will be listed once.
Visit a different tab (e.g. info)
Area list will update with a second copy of all areas.
Each visits to another tab and return to the Seeding Input form will add another copy of the areas to the drop down.
Based on the above behavior this appears to have something to do with the way the caching is done for areas. It should be compared to what is being done for the crops which are not exhibiting the same behavior.
Confirmed that this is related to the caching of the areas in the local storage. When the areas are requested each time and not retrieved from cache there is no duplication.
Comment by braughtg Tuesday Jun 07, 2022 at 13:16 GMT
Issue is that the call to getAllPages appends new responses to the provided array, it does not clear the array. Thus, when the cached version of the area response is used, the subsequent call to the API to check for updates adds to the response, it does not replace the response.
Comment by braughtg Tuesday Jun 07, 2022 at 13:25 GMT
The Area drop down in the Seeding Input form contains duplicates. The same list of areas appears to be being appended to the dropdown multiple times. Each Area should appear in this list only one time.
Steps to Reproduce
Based on the above behavior this appears to have something to do with the way the caching is done for areas. It should be compared to what is being done for the crops which are not exhibiting the same behavior.
Issue by braughtg
Tuesday Jun 07, 2022 at 13:06 GMT
Originally opened as DickinsonCollege/FarmData2#460
The text was updated successfully, but these errors were encountered: