Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

fixes clearing fields that should not be clearable

jonaswinkler0aad31b4bc6b
diff --git a/src-ui/src/app/components/common/input/select/select.component.html b/src-ui/src/app/components/common/input/select/select.component.html
index d33dae425..780dc5686 100644
--- a/src-ui/src/app/components/common/input/select/select.component.html
+++ b/src-ui/src/app/components/common/input/select/select.component.html
@@ -5,6 +5,7 @@
[disabled]="disabled"
[style.color]="textColor"
[style.background]="backgroundColor"
+ [clearable]="allowNull"
(change)="onChange(value)"
(blur)="onTouched()">
<ng-option *ngFor="let i of items" [value]="i.id">{{i.name}}</ng-option>
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html
index 228264378..ae3fb0c0a 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.html
+++ b/src-ui/src/app/components/document-detail/document-detail.component.html
@@ -67,9 +67,9 @@
formControlName='archive_serial_number'>
</div>
<app-input-date-time titleDate="Date created" formControlName="created"></app-input-date-time>
- <app-input-select [items]="correspondents" title="Correspondent" formControlName="correspondent"
+ <app-input-select [items]="correspondents" title="Correspondent" formControlName="correspondent" [allowNull]="true"
(createNew)="createCorrespondent()"></app-input-select>
- <app-input-select [items]="documentTypes" title="Document type" formControlName="document_type"
+ <app-input-select [items]="documentTypes" title="Document type" formControlName="document_type" [allowNull]="true"
(createNew)="createDocumentType()"></app-input-select>
<app-input-tags formControlName="tags" title="Tags"></app-input-tags>