Skip to content

Commit

Permalink
Fix PictureSequenceInfoField sometimes showing no pictures (#646)
Browse files Browse the repository at this point in the history
Before, when switching between two pictures, where the first is part of
a  sequence, the the other pictures in the sequence are not shown when
switching back to the first. The exact reason is unclear, however print
debugging has shown that during switching, the correct array of pictures
is displayed first, only to be replaced by an empty array shortly after.
Since this commit fixes the issue by changing the fetchPolicy from
'cache-first' (default) to 'cache-and-network', the problem is likely
related to Apollo's caching behavior.
  • Loading branch information
MariusDoe authored Aug 9, 2024
1 parent bdd70dd commit 8139bd5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const PictureSequenceInfoField = ({ picture }: { picture: FlatPicture }) => {
textFilter={TextFilter.PICTURES_AND_TEXTS}
cacheOnRefetch
onSort={canEdit ? onSort : undefined}
fetchPolicy='cache-and-network'
/>
</ScrollContainer>
</ScrollProvider>
Expand Down

0 comments on commit 8139bd5

Please sign in to comment.