ProjectMirador / research-and-demos

Proofs of concept for Mirador 3
10 stars 8 forks source link

Window component should handle props update #68

Open christopher-johnson opened 5 years ago

christopher-johnson commented 5 years ago

there is an issue if a manifest is rendered by window and then the same manifest is loaded in the form that results in a "Cannot read property 'getLabel' of undefined error" in Window.render(). Window will not remount in this case, so the component should expect a props update and re-instantiate the viewer instance (and do a refetch for tiles, etc.) when the required manifest prop has been re-propagated from store. This can be done within ComponentDidUpdate.