Refresh on error
This commit is contained in:
parent
dad689c787
commit
d73d7113ae
|
@ -19,13 +19,17 @@
|
||||||
const visible = permission !== PERMISSION_OPTIONS.HIDDEN
|
const visible = permission !== PERMISSION_OPTIONS.HIDDEN
|
||||||
const readonly = permission === PERMISSION_OPTIONS.READONLY
|
const readonly = permission === PERMISSION_OPTIONS.READONLY
|
||||||
|
|
||||||
datasource.actions.addSchemaMutation(column.name, { visible, readonly })
|
await datasource.actions.addSchemaMutation(column.name, {
|
||||||
|
visible,
|
||||||
|
readonly,
|
||||||
|
})
|
||||||
try {
|
try {
|
||||||
await datasource.actions.saveSchemaMutations()
|
await datasource.actions.saveSchemaMutations()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
notifications.error(e.message)
|
notifications.error(e.message)
|
||||||
} finally {
|
} finally {
|
||||||
datasource.actions.resetSchemaMutations()
|
await datasource.actions.resetSchemaMutations()
|
||||||
|
await datasource.actions.refreshDefinition()
|
||||||
}
|
}
|
||||||
dispatch(visible ? "show-column" : "hide-column")
|
dispatch(visible ? "show-column" : "hide-column")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue