Remove selected

This commit is contained in:
Adina Țeudan 2021-04-08 20:23:59 +03:00
parent 272c059e65
commit a64a2a5b09
4 changed files with 23 additions and 1 deletions

View File

@ -121,6 +121,16 @@
<span class="all-caps-label">
{{ 'file-attributes-csv-import.table-header.title' | translate: { length: activeFields.length } }}
</span>
<ng-container *ngIf="areSomeFieldsSelected">
<redaction-circle-button
(action)="deactivateSelection()"
tooltip="file-attributes-csv-import.table-header.actions.remove-selected"
type="dark-bg"
icon="red:trash"
>
</redaction-circle-button>
</ng-container>
</div>
<div class="table-header" redactionSyncWidth="table-item">

View File

@ -169,6 +169,10 @@
padding: 0 24px 0 10px;
box-shadow: none;
border-top: 1px solid $separator;
.all-caps-label {
margin-right: 10px;
}
}
cdk-virtual-scroll-viewport {

View File

@ -165,6 +165,11 @@ export class FileAttributesCsvImportDialogComponent implements OnInit {
return this.selectedFields.indexOf(field) !== -1;
}
public deactivateSelection() {
this.activeFields = [...this.activeFields.filter((field) => !this.isFieldSelected(field.csvColumn))];
this.selectedFields = [];
}
public async save() {
const promises: Promise<FileAttributeConfig | FileAttributesConfig>[] = [
this._fileAttributesControllerService.addOrUpdateFileAttributesBaseConfig(this.baseConfigForm.getRawValue(), this.ruleSetId).toPromise()

View File

@ -1122,7 +1122,10 @@
"csv-column": "CSV Column",
"no-hovered-column": "Preview CSV column by hovering the entry.",
"table-header": {
"title": "{{length}} file attributes"
"title": "{{length}} file attributes",
"actions": {
"remove-selected": "Remove Selected"
}
},
"file": "File:",
"table-col-names": {