Skip to content

Commit

Permalink
fix(ui-results): disable stretch to fix display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hdinia committed Feb 23, 2024
1 parent 35947e1 commit 9be770e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ function ResultDetails() {
<EditableMatrix
matrix={matrix}
matrixTime={false}
stretch={false}
readOnly
/>
)
Expand Down
5 changes: 3 additions & 2 deletions webapp/src/components/common/EditableMatrix/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface PropTypes {
rowNames?: string[];
computStats?: MatrixStats;
isPercentDisplayEnabled?: boolean;
stretch?: boolean;
}

type CellType = Array<number | string | boolean>;
Expand Down Expand Up @@ -55,6 +56,7 @@ function EditableMatrix(props: PropTypes) {
rowNames,
computStats,
isPercentDisplayEnabled = false,
stretch = true,
} = props;
const { data = [], columns = [], index = [] } = matrix;
const prependIndex = index.length > 0 && matrixTime;
Expand Down Expand Up @@ -176,7 +178,7 @@ function EditableMatrix(props: PropTypes) {
data={grid}
width="100%"
height="100%"
stretchH="all"
stretchH={stretch ? "all" : "none"}
className="editableMatrix"
colHeaders
rowHeaderWidth={matrixRowNames ? 150 : undefined}
Expand All @@ -186,7 +188,6 @@ function EditableMatrix(props: PropTypes) {
beforeKeyDown={(e) => handleKeyDown(e)}
columns={formattedColumns}
rowHeaders={matrixRowNames || true}
manualColumnResize
/>
</Root>
);
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/common/EditableMatrix/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const Root = styled(Box)(({ theme }) => ({
display: "flex",
flexDirection: "column",
alignItems: "center",
overflow: "auto",
overflow: "hidden",
}));

export const StyledButton = styled(Button)(({ theme }) => ({
Expand Down

0 comments on commit 9be770e

Please sign in to comment.