Skip to content

Commit

Permalink
Merge branch '#268'
Browse files Browse the repository at this point in the history
  • Loading branch information
gordom6 committed Oct 30, 2020
2 parents 9d90b90 + 2bde957 commit 8b0b2eb
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion gui/src/shared/components/kg/node/KgNodeContextEdgesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {kgId} from "shared/api/kgId";
import {KgSourcePill} from "shared/components/kg/source/KgSourcePill";
import MUIDataTable, {MUIDataTableColumnDef} from "mui-datatables";
import {HrefsContext} from "shared/HrefsContext";
import {makeStyles} from "@material-ui/core/styles";

const theme = createMuiTheme({
overrides: {
Expand All @@ -33,6 +34,20 @@ const theme = createMuiTheme({
} as any,
});

const useStyles = makeStyles((theme) => ({
nodeLabelCell: {
marginBottom: "0 !important",
paddingBottom: "0 !important",
paddingRight: "0 !important",
paddingTop: "0 !important",
},
sourceIdsCell: {
marginBottom: "0 !important",
padding: "0 !important",
width: "auto",
},
}));

// for (const objectNodeLabel of objectNodeLabels) {
// if (
// predicateNodeLabels.some(
Expand All @@ -51,6 +66,7 @@ export const KgNodeContextEdgesGrid: React.FunctionComponent<{
allSources: readonly KgSource[];
nodeContext: KgNodeContext;
}> = ({allSources, nodeContext}) => {
const classes = useStyles();
const hrefs = React.useContext<Hrefs>(HrefsContext);

const relatedNodeLabelsByNodeId: {
Expand Down Expand Up @@ -108,11 +124,14 @@ export const KgNodeContextEdgesGrid: React.FunctionComponent<{
label: nodeLabel,
})}
>
<span style={{marginRight: "5px"}}>{nodeLabel}</span>
<span>{nodeLabel}</span>
</Link>
);
},
customHeadRender: () => null,
setCellProps: () => ({
className: classes.nodeLabelCell,
}),
},
},
{
Expand Down Expand Up @@ -140,6 +159,9 @@ export const KgNodeContextEdgesGrid: React.FunctionComponent<{
);
},
customHeadRender: () => null,
setCellProps: () => ({
className: classes.sourceIdsCell,
}),
},
},
];
Expand Down Expand Up @@ -199,7 +221,12 @@ export const KgNodeContextEdgesGrid: React.FunctionComponent<{
fixedHeader: false,
fixedSelectColumn: false,
pagination: data.length > 10,
rowsPerPageOptions: [],
selectableRows: "none",
setTableProps: () => ({
// padding: "none",
size: "small",
}),
}}
title={""}
/>
Expand Down

0 comments on commit 8b0b2eb

Please sign in to comment.