-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Reflect column and engine values for existing tables #2444
base: main
Are you sure you want to change the base?
Conversation
@@ -199,12 +199,17 @@ export default function SchemaBox({ | |||
?.map((tableMap) => tableMap.sourceTableIdentifier) | |||
.includes(row.source) | |||
) { | |||
const existingRow = alreadySelectedTables?.find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const existingRow = alreadySelectedTables?.find( | |
const existingRow = alreadySelectedTables.find( |
can remove the ?.map
above too. As is it'll hit an error about trying to call undefined
as a function. You'd have to use the find?.(...)
to null check the call too. Tho, in this case, we only end up here if map includes returned true, so if alreadySelectedTables was null/undefined you'd never run this code in that case
This might be related to earlier PR preferring sending empty arrays over null
alreadySelectedTables?.find( | ||
(tableMap) => tableMap.sourceTableIdentifier === row.source | ||
)?.destinationTableIdentifier ?? ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alreadySelectedTables?.find( | |
(tableMap) => tableMap.sourceTableIdentifier === row.source | |
)?.destinationTableIdentifier ?? ''; |
Currently, excluded columns and engine selection are not populated in the table box for an existing table in the mirror (where the destination field, engine, columns are disabled)
This PR wires those through. Tested