pano9000 / freeCodeCamp_backend_exercise-tracker

My WIP for the Exercise Tracker project from freeCodeCamp
0 stars 0 forks source link

vue/DataTable: data fetching is triggered twice, when using filters #64

Closed pano9000 closed 1 year ago

pano9000 commented 1 year ago

The data fetching is triggered twice, when using the filters. This is caused by the 2 watchers: First one watches for the filters, which loads the data and then changes the totalEntries accordingly. This then causes the totalEntries watcher to detect the change and refetch the data

The totalEntries watcher is used to "force" reload on entry deletion, maybe there is a better way to achieve that, so that we can get rid of this bug