Skip to content

Commit ebad041

Browse files
authored
Fix: wrong argument order for getCellContent (#1234)
1 parent f357011 commit ebad041

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

web/client/src/library/components/tableDiff/TableDiff.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import clsx from 'clsx'
22
import { Fragment, useState } from 'react'
33
import {
4+
EMPTY_TABLE_CELL,
5+
TARGET_PREFIX,
46
getCellContent,
57
getCellContentSource,
68
getCellContentTarget,
@@ -168,7 +170,8 @@ export default function TableDiff({ diff }: { diff: any }): JSX.Element {
168170
grain.includes(header) && 'bg-brand-10',
169171
)}
170172
>
171-
{getCellContent(diff, header, rowKey, diff.on)}
173+
{getCellContent(diff, TARGET_PREFIX, header, rowKey) ??
174+
EMPTY_TABLE_CELL}
172175
</td>
173176
),
174177
)}

web/client/src/library/components/tableDiff/help.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import { isFalse, isNotNil, isNil } from '@utils/index'
22
import { type Filters } from './TableDiff'
33

4+
const SOURCE_PREFIX = 's__'
5+
const TARGET_PREFIX = 't__'
6+
const EMPTY_TABLE_CELL = 'NULL'
7+
48
export {
9+
SOURCE_PREFIX,
10+
TARGET_PREFIX,
11+
EMPTY_TABLE_CELL,
512
getHeaders,
613
getRows,
714
hasModified,
@@ -13,10 +20,6 @@ export {
1320
getCellContentTarget,
1421
}
1522

16-
const SOURCE_PREFIX = 's__'
17-
const TARGET_PREFIX = 't__'
18-
const EMPTY_TABLE_CELL = 'NULL'
19-
2023
function getHeaders(
2124
{
2225
source_schema,

0 commit comments

Comments
 (0)