Quiz editor does not load slide thumbnails and has invalid Quiz linter result on delayed PDF load (3)
Sometimes when the download of a PDF is somewhat delayed, thumbnails of the slides in a Quiz that use that PDF do not load, even after the PDF has been downloaded. Also, if the Quiz contains references to a page inside the PDF file that does not exist, no Quiz Linter error is shown after the PDF is loaded.
This problem has something to do with React's asynchronous system of updating a components state. It might be the case that the object given to the state is actually a reference, and React cannot figure out the state.
To do:
-
Investigate whether the state is indeed the problem with this bug. -
Change state such that it does not contain the PDF objects anymore (which is not recommended anyway). Instead, use an array of loaded PDF ids and some kind of PDF store object to obtain the PDF objects from.
Edited by Remco de Man