codeandcognition / koconut

a very cool assess pool
2 stars 0 forks source link

values in not clearing between exercises #382

Closed bxie closed 5 years ago

bxie commented 5 years ago

Values in memory tables still appear even when switching exercises. May be a larger issue where correctness not being checked correctly for edge cases where prior memory table exercise had a table which was longer than new table.

To replicate:

  1. Go to memory table exercise (e.g. practice read float equality)
  2. put values into memory table
  3. using side nav, click on a different memory table exercise

expected: memory table is cleared when new exercise selected actual: memory table shows values from previous table

Should be easy fix. Probably just clear the data in state.responses(?) during componentDidUnmount

bxie commented 5 years ago

memory table now clears on question change 11b43397b4fd0abee0cf3c8350118d4e7772506a

bxie commented 5 years ago

fixed by updating state on componentDidUpdate()