Skip to content

Commit

Permalink
fix: breadcrumb not change after table rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Dec 27, 2020
1 parent 56f2a27 commit b6b7be0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/renderer/components/WorkspacePropsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b6b7be0

Please sign in to comment.