I am using Pinia store for state management. Actually I am maintaining a reactive array named userPositions which takes some time to take up values. So initially it is empty and then upon component mounting, I make some service calls and based upon some calculations I update the userPositions array. I am using Data Grid to display the content of the array. Now the problem is that the userPositions array takes some time to build and get updated in the pinia store, so the data grid renders first showing “No Data” which is fair enough because the data takes up 1-2 seconds to get updated in the state. The problem is that even after 1-2 seconds, the grid continues to show “No data” even when the userPositions reactive array has been updated in the pinia store. I wanted to ask why does the grid not re-render again when the value of the datasource was updated? Also, if i make any change in my code editor and then save the project, the grid starts showing the updated array value. Why is this happening and how can I resolve this?
I am expecting the community to help me out with this!
Manan Mittal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.