Skip to content

Commit

Permalink
Merge pull request #409 from IQSS/fix/408-collection-page-refetch-dat…
Browse files Browse the repository at this point in the history
…aset

Fix - Collection page datasets not being refetched after navigating from a sub collection.
  • Loading branch information
GPortas authored Jun 6, 2024
2 parents 2ec048c + d82bbcf commit d2789fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/sections/collection/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,18 @@ export function Collection({
</>
)}
{infiniteScrollEnabled ? (
<DatasetsListWithInfiniteScroll datasetRepository={datasetRepository} collectionId={id} />
<DatasetsListWithInfiniteScroll
datasetRepository={datasetRepository}
collectionId={id}
key={id}
/>
) : (
<DatasetsList datasetRepository={datasetRepository} page={page} collectionId={id} />
<DatasetsList
datasetRepository={datasetRepository}
page={page}
collectionId={id}
key={id}
/>
)}
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import { NotImplementedModalProvider } from '../../sections/not-implemented/NotI
const meta: Meta<typeof CreateDataset> = {
title: 'Pages/Create Dataset',
component: CreateDataset,
decorators: [WithI18next, WithLayout]
decorators: [WithI18next, WithLayout],
parameters: {
// Sets the delay for all stories.
chromatic: { delay: 15000, pauseAnimationAtEnd: true }
}
}
export default meta
type Story = StoryObj<typeof CreateDataset>
Expand Down

0 comments on commit d2789fc

Please sign in to comment.