Hide column

This commit is contained in:
Adria Navarro 2024-09-27 11:14:32 +02:00
parent 64f4497c76
commit f73cf5983a
1 changed files with 11 additions and 1 deletions

View File

@ -165,7 +165,17 @@
}
const hideColumn = () => {
datasource.actions.addSchemaMutation(column.name, { visible: false })
const { related } = column
const mutation = { visible: false }
if (!related) {
datasource.actions.addSchemaMutation(column.name, mutation)
} else {
datasource.actions.addSubSchemaMutation(
related.subField,
related.field,
mutation
)
}
datasource.actions.saveSchemaMutations()
open = false
}