Skip to content

Commit

Permalink
fix(capture): enables scrolling in Capture page (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
mqnguyen5 authored Oct 30, 2021
1 parent 4043e25 commit 9d2a145
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/CaptureTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ const CaptureTable = () => {
});
};

const handlePageChange = () => {
const handlePageChange = (e, newPage) => {
loadCaptures({
page: capturesContext.page + 1,
page: newPage,
rowsPerPage: capturesContext.rowsPerPage,
filter: capturesContext.filter,
});
Expand Down Expand Up @@ -228,7 +228,7 @@ const CaptureTable = () => {
)}
</Navbar>
</Grid>
<Grid item>
<Grid item style={{ height: '100%', overflowY: 'scroll' }}>
<div className={classes.tableContainer} ref={scrollRef}>
<Grid
container
Expand Down
16 changes: 7 additions & 9 deletions src/views/CapturesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ function CapturesView() {
direction="column"
style={{ flexWrap: 'nowrap', height: '100%' }}
>
<Grid item container style={{ height: '100%', overflow: 'hidden' }}>
<CapturesProvider>
<SpeciesProvider>
<TagsProvider>
<CaptureTable />
</TagsProvider>
</SpeciesProvider>
</CapturesProvider>
</Grid>
<CapturesProvider>
<SpeciesProvider>
<TagsProvider>
<CaptureTable />
</TagsProvider>
</SpeciesProvider>
</CapturesProvider>
</Grid>
);
}
Expand Down

0 comments on commit 9d2a145

Please sign in to comment.