1
1
mirror of https://github.com/Fabio286/antares.git synced 2024-12-24 16:00:54 +01:00

fix: breadcrumb not change after table rename

This commit is contained in:
Fabio Di Stasio 2020-12-27 13:08:13 +01:00
parent 56f2a27f00
commit b6b7be098a

View File

@ -200,7 +200,8 @@ export default {
...mapActions({
addNotification: 'notifications/addNotification',
refreshStructure: 'workspaces/refreshStructure',
setUnsavedChanges: 'workspaces/setUnsavedChanges'
setUnsavedChanges: 'workspaces/setUnsavedChanges',
changeBreadcrumbs: 'workspaces/changeBreadcrumbs'
}),
async getFieldsData () {
if (!this.table) return;
@ -394,7 +395,15 @@ export default {
const { status, response } = await Tables.alterTable(params);
if (status === 'success') {
const oldName = this.tableOptions.name;
await this.refreshStructure(this.connection.uid);
if (oldName !== this.localOptions.name) {
this.setUnsavedChanges(false);
this.changeBreadcrumbs({ schema: this.schema, table: this.localOptions.name });
}
this.getFieldsData();
}
else