cs136 / seashell

Seashell is an online environment for editing, running, and submitting C programming assignments.
GNU General Public License v3.0
38 stars 19 forks source link

List of files doesn't refresh when switching projects that don't have files opened #816

Closed yc2lee closed 6 years ago

yc2lee commented 7 years ago

If you are viewing a question with no files open (so it shows a list of files) and switch to another question that also has no files open, it will not refresh the list of available files. If you click on one of the files from the previously-open question, Seashell returns to the project selection screen.

e45lee commented 7 years ago

The file list component binds the question/project in its constructor, so it doesn't pick up the changes when the state is updated.

Just refer to the question/project in the List component render function.