Dashboard bug - incorrect argument to child component onOptionChange
Issue #874
resolved
onOptionChange
reports that an option has been changed in the dashboard.
public onOptionChange(changes) {
if (changes.selectedYear) {
...
}
}
Here `changes is expected to be
{optionName: {
new: 'newvalue', old:'oldvalue'
}
but it is not - it is the changes shape from $onChanges
{currentValue;previousValue}
we we want passed is changes.currentValue
Amazingly for a bug that has been there so long as is so widely used, it does not seem to have caused any discernable problems.
Fix it, then add typechecking everywhere to clarify what is meant to be happening here.
Comments (2)
-
-
reporter - changed status to resolved
task(dashboard): add type to arg of onOptionChange: resolve error in what is actually passed from onChanges
Resolves
#874→ <<cset 5ac4312c1f14>>
- Log in to comment
@Brian Lewis something related or similar to this bug seem to be the reason for the school exam dashboard broken as in
#876. Seems I am getting something different then before in onOptionChange