Closed stinger222 closed 1 year ago
And obvious solution like resetting class fields when class schedule is changed, won't work, cause 1st: it will be annoying, and 2nd: it will be X10 times more annoying if user just wanna quickly edit classes schedule on already existing, fully assembled schedule, cause he noticed that it's wrong one or something
Now It's pretty much impossible because of new validation rules (despite shitcode nature of this change) that was added in 46fd3075a680ac51d4f561931308d952fa9afc56, and because even if it will somehow happen (for example if user will import modified state), then this change: 01337555977259c99bc93d5a01ab23dc6828d700 will make timeline render question marks instead of non-existing time, causing error
You can't add more periods/lessons than selected rings schedule describes. For example, rings schedule user selected describes just 2 periods, after he'll add second period, "add" button will disappear, preventing him from impossible situation that app obviously can't process (it shouldn't anyway)
BUT, user still can select other rings schedule after adding some lessons, and this can cause mentioned problem.
react-hook-form have manual validation trigger that I call in
useEffect
that triggers whenever new field is added, but APPARENTLY, problem is not that validation isn't being called, but rater that this situation is perfectly valid for validation function.