Skip to content

Commit

Permalink
table view: fix bulk action and delete primary keys in case of comple…
Browse files Browse the repository at this point in the history
…x primary leys
  • Loading branch information
lyubov-voloshko committed Feb 7, 2025
1 parent 0312378 commit 5d89530
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ export class DbTableComponent implements OnInit {
this._tableState.setBackUrlFilters(this.activeFilters);
}

getPrimaryKeys() {
return this.selection.selected
.map(row => Object.assign({}, ...this.tableData.keyAttributes.map((primaryKey) => ({[primaryKey.column_name]: row[primaryKey.column_name]}))));
}

getIdentityFieldsValues() {
if (this.tableData.identityColumn) return this.selection.selected.map(row => row[this.tableData.identityColumn]);
return null;
Expand All @@ -358,7 +353,7 @@ export class DbTableComponent implements OnInit {
}

handleActions(action) {
const primaryKeys = this.getPrimaryKeys();
const primaryKeys = this.selection.selected.map(row => this.tableData.getQueryParams(row));
const identityFieldValues = this.getIdentityFieldsValues();

this.activateActions.emit({
Expand Down

0 comments on commit 5d89530

Please sign in to comment.