This commit is contained in:
@@ -312,16 +312,8 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
//fetch the data for the record as if it's a new record
|
||||
bugbug: if we are here because a recent submit this triggers a full fetch
|
||||
//except there's no reason to full fetch as we already have the data required from the submit
|
||||
//so need to flag that somehow or figure out better logic here
|
||||
|
||||
//- Only CREATED and beforeRouteUpdate are triggering GetDataFromAPI, created is valid on open of course so need to handle beforerouteupdate
|
||||
//-Does it really need to even do anything, I mean, why would the route update, I guess when navigating back and forth between widgets?
|
||||
|
||||
//WHY IS THIS REQUIRED? IS IT BECAUSE OF NAV BACK AND FORTH BETWEEN WIDGETS MAYBE??
|
||||
//TEST THAT BEFORE PROCEEDING WITH ANY FIX FOR SUBMIT FETCH ISSUE
|
||||
//This triggers a fetch of the data when the ID value changes on the route
|
||||
//which happens on duplicate, submit new record and change of active record id (backward nav/forward nav etc)
|
||||
if (to.params.recordid != 0) {
|
||||
this.getDataFromApi(to.params.recordid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user