nkfoss / ohm-str

0 stars 0 forks source link

GetRecordMaxFromName() gets called when it shouldn't #38

Closed nkfoss closed 4 years ago

nkfoss commented 4 years ago

This RepMaxService method is getting called when it shouldn't. There are multiple parts to this problem, but they all occur while the SetListComponent is open:

  1. Clicking anything in the navbar (except 'Logout') triggers the method call.
  2. Selecting or changing the value of the 'bodyweight' input triggers the method call.

In addition, it seems like there are duplicate method calls (in a row) for each exercise. Not necessary at all.

nkfoss commented 4 years ago

It has to do with the template (SetListComp). There are two consecutive calls to getRecordMax(exerciseName).

This seems really bad, and I'm not sure the correct way to fix this, other than I need to get this method call out of the template.