Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit e4c2c36

Browse files
committed
fixed
1 parent 024dab4 commit e4c2c36

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/reducers/DatabaseDispatch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function databaseReducer(state:TableDataType, action:ActionType) {
8888
skipReset: true,
8989
columns: [
9090
...state.columns.slice(0, index),
91-
{ ...state.columns[index], label: action.label },
91+
{ ...state.columns[index], label: action.label, id: update_col_key, key: update_col_key, accessor: update_col_key },
9292
...state.columns.slice(index + 1, state.columns.length)
9393
]
9494
};

src/services/DatabaseInfo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export default class DatabaseInfo {
8787
colToUpdate[key] = properties[key];
8888
}
8989
this.yaml.columns[columnId] = colToUpdate;
90-
await this.saveOnDisk();
9190
if(rows){
91+
await this.updateColumnKey(columnId, colToUpdate.accessor);
9292
// Once the column is updated, update the rows in case the key is changed
9393
await Promise.all(rows.map(async (row:TableRow) => {
9494
updateRowFile(
@@ -99,6 +99,7 @@ export default class DatabaseInfo {
9999
);
100100
}));
101101
}
102+
await this.saveOnDisk();
102103
}
103104

104105
/**

0 commit comments

Comments
 (0)