Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit cd6f290

Browse files
committed
fix: Saved correlations modal fields wrap
1 parent 88802eb commit cd6f290

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/pages/Correlation/components/SavedCorrelationItem.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Stack, Box, Button, Text, px, Code } from '@mantine/core';
22
import { IconClock, IconEye, IconEyeOff, IconTrash, IconX } from '@tabler/icons-react';
3-
import { useState, useCallback, Fragment, FC } from 'react';
3+
import { useState, useCallback, FC } from 'react';
44
import classes from '../styles/SavedCorrelationItem.module.css';
55
import { Correlation } from '@/@types/parseable/api/correlation';
66
import dayjs from 'dayjs';
@@ -51,14 +51,13 @@ const SelectedFields: FC<{ tableConfigs: TableConfig[] }> = ({ tableConfigs }) =
5151
);
5252

5353
return (
54-
<div className="space-x-1">
55-
<span style={{ fontSize: '11px' }}>Selected Fields: </span>
56-
{fields.map((field, index) => (
57-
<Fragment key={field.key}>
54+
<div>
55+
<div style={{ fontSize: '11px' }}>Selected Fields: </div>
56+
<div style={{ display: 'flex', gap: '5px', flexWrap: 'wrap', marginTop: '5px' }}>
57+
{fields.map((field) => (
5858
<Code>{field.content}</Code>
59-
{index < fields.length - 1 && <span>,</span>}
60-
</Fragment>
61-
))}
59+
))}
60+
</div>
6261
</div>
6362
);
6463
};
@@ -73,8 +72,8 @@ const JoinConditions: FC<{ joinConfig: JoinConfig }> = ({ joinConfig }) => {
7372
if (!nextJoin) return null;
7473

7574
return (
76-
<div key={`join-${index}`} className="space-x-1">
77-
<span style={{ fontSize: '11px' }}>Join Condition:</span>
75+
<div key={`join-${index}`}>
76+
<div style={{ fontSize: '11px' }}>Join Condition:</div>
7877
<Code>{`${join.tableName}.${join.field}`}</Code>
7978
<span>=</span>
8079
<Code>{`${nextJoin.tableName}.${nextJoin.field}`}</Code>
@@ -154,7 +153,7 @@ const SavedCorrelationItem = (props: { item: Correlation }) => {
154153
</Stack>
155154
</Stack>
156155
{showQuery && (
157-
<Stack gap={0}>
156+
<Stack gap={10}>
158157
<SelectedFields tableConfigs={tableConfigs} />
159158
<JoinConditions joinConfig={joinConfig} />
160159
</Stack>

0 commit comments

Comments
 (0)