Dashboard bug - incorrect argument to child component onOptionChange

Issue #874 resolved
Brian Lewis repo owner created an issue

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)

  1. Ghislain Hachey

    @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

  2. Log in to comment