mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 00:02:13 +00:00
fix default value
This commit is contained in:
@@ -93,9 +93,20 @@
|
||||
} else if (origTable && currTable) {
|
||||
const currWithInitial: TableEditorValues = {
|
||||
...currTable,
|
||||
columns: currTable.columns.map((col) => ({ ...col, initialName: col.name }))
|
||||
columns: currTable.columns.map((col) => ({
|
||||
...col,
|
||||
initialName: col.name,
|
||||
defaultValue: col.defaultValue ? `{${col.defaultValue}}` : undefined
|
||||
}))
|
||||
}
|
||||
const diff = diffTableEditorValues(origTable, currWithInitial)
|
||||
const origTableTransformed: TableEditorValues = {
|
||||
...origTable,
|
||||
columns: origTable.columns.map((col) => ({
|
||||
...col,
|
||||
defaultValue: col.defaultValue ? `{${col.defaultValue}}` : undefined
|
||||
}))
|
||||
}
|
||||
const diff = diffTableEditorValues(origTableTransformed, currWithInitial)
|
||||
if (diff.operations.length > 0) {
|
||||
diffs.push({ schemaName, tableName, kind: 'modified', operations: diff })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user