Fixed jobline insert trigger. RPS-15
This commit is contained in:
@@ -154,17 +154,19 @@ export default function JobLinesTableMolecule({ loading, job }) {
|
||||
x: true,
|
||||
y: "20rem",
|
||||
}}
|
||||
footer={() => (
|
||||
<Table.Summary.Row>
|
||||
<Table.Summary.Cell index={0}>Summary</Table.Summary.Cell>
|
||||
<Table.Summary.Cell index={5}>
|
||||
This is a summary content
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell index={6}>
|
||||
This is a summary content
|
||||
</Table.Summary.Cell>
|
||||
</Table.Summary.Row>
|
||||
)}
|
||||
// summary={
|
||||
// () => (
|
||||
// <Table.Summary.Row>
|
||||
// <Table.Summary.Cell index={0}>Summary</Table.Summary.Cell>
|
||||
// <Table.Summary.Cell index={5}>
|
||||
// This is a summary content
|
||||
// </Table.Summary.Cell>
|
||||
// <Table.Summary.Cell index={6}>
|
||||
// This is a summary content
|
||||
// </Table.Summary.Cell>
|
||||
// </Table.Summary.Row>
|
||||
// )
|
||||
// }
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -35,36 +35,37 @@ export default function JobsTableOrganism() {
|
||||
);
|
||||
|
||||
const handleInfiniteOnLoad = (page) => {
|
||||
if (fetchMore)
|
||||
if (fetchMore) {
|
||||
ipcRenderer.send(ipcTypes.default.app.toMain.track, {
|
||||
event: "FETCH_MORE_JOBS",
|
||||
});
|
||||
fetchMore({
|
||||
variables: {
|
||||
offset: limit * page,
|
||||
},
|
||||
updateQuery: (prev, { fetchMoreResult }) => {
|
||||
if (!fetchMoreResult) {
|
||||
console.log("No more results. Fetch More was empty.");
|
||||
setState({ ...state, hasMore: false });
|
||||
return prev;
|
||||
}
|
||||
fetchMore({
|
||||
variables: {
|
||||
offset: limit * page,
|
||||
},
|
||||
updateQuery: (prev, { fetchMoreResult }) => {
|
||||
if (!fetchMoreResult) {
|
||||
console.log("No more results. Fetch More was empty.");
|
||||
setState({ ...state, hasMore: false });
|
||||
return prev;
|
||||
}
|
||||
|
||||
const newCache = Object.assign({}, prev, {
|
||||
jobs: [...prev.search_jobs, ...fetchMoreResult.search_jobs],
|
||||
});
|
||||
const newCache = Object.assign({}, prev, {
|
||||
jobs: [...prev.search_jobs, ...fetchMoreResult.search_jobs],
|
||||
});
|
||||
|
||||
if (
|
||||
newCache.jobs.length >= data &&
|
||||
data.search_jobs_aggregate.aggregate.count
|
||||
) {
|
||||
console.log("No more results.");
|
||||
setState({ ...state, hasMore: false });
|
||||
}
|
||||
if (
|
||||
newCache.jobs.length >= data &&
|
||||
data.search_jobs_aggregate.aggregate.count
|
||||
) {
|
||||
console.log("No more results.");
|
||||
setState({ ...state, hasMore: false });
|
||||
}
|
||||
|
||||
return newCache;
|
||||
},
|
||||
});
|
||||
return newCache;
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if (error)
|
||||
|
||||
Reference in New Issue
Block a user