Skip to content

Commit

Permalink
UI: filter out no canMirror (#1394)
Browse files Browse the repository at this point in the history
Fixes a bug with select all where not mirrorable tables are included
  • Loading branch information
Amogh-Bharadwaj authored Feb 28, 2024
1 parent a8a1f47 commit 69c6f34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/app/mirrors/create/cdc/schemabox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const SchemaBox = ({
const newRows = [...rows];
for (let i = 0; i < newRows.length; i++) {
const row = newRows[i];
if (row.schema === schemaName) {
if (row.schema === schemaName && row.canMirror) {
newRows[i] = { ...row, selected: e.currentTarget.checked };
if (e.currentTarget.checked) addTableColumns(row.source);
else removeTableColumns(row.source);
Expand Down
2 changes: 1 addition & 1 deletion ui/app/mirrors/create/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const reformattedTableMapping = (
tableMapping: TableMapRow[]
): TableMapping[] => {
const mapping = tableMapping
.filter((row) => row?.selected === true)
.filter((row) => row?.selected === true && row?.canMirror === true)
.map((row) => ({
sourceTableIdentifier: row.source,
destinationTableIdentifier: row.destination,
Expand Down

0 comments on commit 69c6f34

Please sign in to comment.