|
|
|
@ -357,10 +357,13 @@ const onFieldUpdate = (state: TableExplorerColumn, skipLinkChecks = false) => {
|
|
|
|
|
newFields.value = newFields.value.map((op) => { |
|
|
|
|
if (compareCols(op, state)) { |
|
|
|
|
ops.value = ops.value.filter((op) => op.op === 'add' && !compareCols(op.column, state)) |
|
|
|
|
ops.value.push({ |
|
|
|
|
op: 'add', |
|
|
|
|
column: state, |
|
|
|
|
}) |
|
|
|
|
ops.value = [ |
|
|
|
|
...ops.value, |
|
|
|
|
{ |
|
|
|
|
op: 'add', |
|
|
|
|
column: state, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
return state |
|
|
|
|
} |
|
|
|
|
return op |
|
|
|
@ -439,10 +442,10 @@ const onFieldAdd = (state: TableExplorerColumn) => {
|
|
|
|
|
|
|
|
|
|
state.temp_id = `temp_${++temporaryAddCount.value}` |
|
|
|
|
state.view_id = view.value?.id as string |
|
|
|
|
ops.value.push({ |
|
|
|
|
ops.value = [...ops.value, { |
|
|
|
|
op: 'add', |
|
|
|
|
column: state, |
|
|
|
|
}) |
|
|
|
|
}] |
|
|
|
|
newFields.value = [...newFields.value, state] |
|
|
|
|
|
|
|
|
|
if (addFieldMoveHook.value) { |
|
|
|
|