Skip to content

Commit

Permalink
fix: Gene signatures section size
Browse files Browse the repository at this point in the history
  • Loading branch information
carcruz committed Nov 6, 2023
1 parent 2594572 commit 5074f55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
21 changes: 7 additions & 14 deletions packages/sections/src/evidence/SysBio/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ import Description from "./Description";
import { epmcUrl } from "../../utils/urls";
import SYSBIO_QUERY from "./sectionQuery.gql";
import { dataTypesMap } from "../../dataTypes";
import { defaultRowsPerPageOptions, naLabel } from "../../constants";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";

const getColumns = (label) => [
const getColumns = label => [
{
id: "disease",
label: "Disease/phenotype",
renderCell: ({ disease }) => (
<Link to={`/disease/${disease.id}`}>{disease.name}</Link>
),
renderCell: ({ disease }) => <Link to={`/disease/${disease.id}`}>{disease.name}</Link>,
filterValue: ({ disease }) => disease.name,
},
{
Expand Down Expand Up @@ -49,11 +47,7 @@ const getColumns = (label) => [
return acc;
}, []) || [];
return (
<PublicationsDrawer
entries={literatureList}
symbol={label.symbol}
name={label.name}
/>
<PublicationsDrawer entries={literatureList} symbol={label.symbol} name={label.name} />
);
},
},
Expand All @@ -65,6 +59,7 @@ function Body({ id, label, entity }) {
const variables = {
ensemblId: ensgId,
efoId,
size: sectionsBaseSizeQuery,
};

const request = useQuery(SYSBIO_QUERY, {
Expand All @@ -79,10 +74,8 @@ function Body({ id, label, entity }) {
chipText={dataTypesMap.affected_pathway}
request={request}
entity={entity}
renderDescription={() => (
<Description symbol={label.symbol} name={label.name} />
)}
renderBody={(data) => (
renderDescription={() => <Description symbol={label.symbol} name={label.name} />}
renderBody={data => (
<DataTable
columns={columns}
dataDownloader
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/SysBio/sectionQuery.gql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
query SysBioQuery($ensemblId: String!, $efoId: String!) {
query SysBioQuery($ensemblId: String!, $efoId: String!, $size: Int!) {
target(ensemblId: $ensemblId) {
approvedSymbol
}
Expand All @@ -8,6 +8,7 @@ query SysBioQuery($ensemblId: String!, $efoId: String!) {
ensemblIds: [$ensemblId]
enableIndirect: true
datasourceIds: ["sysbio"]
size: $size
) {
count
rows {
Expand Down

0 comments on commit 5074f55

Please sign in to comment.