diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html index 607d5f3cc..0eb655a21 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -76,10 +76,8 @@ @if (permissionService.currentUserCan(PermissionAction.View, PermissionType.CustomField)) { (this.customFields = result.results)) + .subscribe( + (result) => (this.customFieldsSelectionModel.items = result.results) + ) } this.downloadForm @@ -735,7 +735,7 @@ export class BulkEditorComponent ) .pipe(takeUntil(this.unsubscribeNotifier)) .subscribe(({ newCustomField, customFields }) => { - this.customFields = customFields.results + this.customFieldsSelectionModel.items = customFields.results this.customFieldsSelectionModel.toggle(newCustomField.id) }) } @@ -873,7 +873,9 @@ export class BulkEditorComponent }) const dialog = modal.componentInstance as CustomFieldsBulkEditDialogComponent - dialog.customFields = this.customFields + dialog.customFields = ( + this.customFieldsSelectionModel.items as CustomField[] + ).filter((f) => f.id !== null) dialog.fieldsToAddIds = changedCustomFields.itemsToAdd.map( (item) => item.id )