From a8b6d8768e6380f2dbc70c87b09145d9f9432b2a Mon Sep 17 00:00:00 2001 From: Julio Sgarbi Date: Wed, 3 Jan 2024 17:44:20 -0300 Subject: [PATCH] fix: LEAP-344: View all annotation tab is not loading --- src/components/App/Grid.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/App/Grid.js b/src/components/App/Grid.js index 1fea7bbef..e53cccba8 100644 --- a/src/components/App/Grid.js +++ b/src/components/App/Grid.js @@ -21,6 +21,11 @@ This triggers next rerender with next annotation until all the annotations are r class Item extends Component { componentDidMount() { Promise.all(this.props.annotation.objects.map(o => { + // as the image has lazy load, and the image is not being added to the viewport + // until it's loaded we need to skip the validation assuming that it's always ready, + // otherwise we'll get a blank canvas + if (o.type === 'image') return Promise.resolve(); + return o.isReady ? Promise.resolve(o.isReady) : new Promise(resolve => {