]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Enhancement: allow tags list selection without auto parent/child feature-auto-heirarchy-toggle
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 4 Nov 2025 16:28:14 +0000 (08:28 -0800)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 4 Nov 2025 16:28:14 +0000 (08:28 -0800)
src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
src-ui/src/app/components/common/input/tags/tags.component.ts

index fab644baa606ae529d4916037d587d506502f4c9..179e1c67eb997baf8a4eabc471c4c6f375080917 100644 (file)
                         <pngx-input-tags
                           [allowCreate]="false"
                           [title]="null"
+                          [autoHeirarchy]="false"
                           formControlName="values"
                         ></pngx-input-tags>
                       } @else if (
index 4546dabcb822a9d9938dd0aafe7d5dbce9785657..180ec6ff4a560c27277a8f6efa4d039e4f56f628 100644 (file)
@@ -103,6 +103,9 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
   @Input()
   multiple: boolean = true
 
+  @Input()
+  autoHeirarchy: boolean = true
+
   @Output()
   filterDocuments = new EventEmitter<Tag[]>()
 
@@ -134,7 +137,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
       oldValue.splice(index, 1)
 
       // remove children
-      oldValue = this.removeChildren(oldValue, tag)
+      if (this.autoHeirarchy) oldValue = this.removeChildren(oldValue, tag)
 
       this.value = [...oldValue]
       this.onChange(this.value)
@@ -153,7 +156,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
   }
 
   public onAdd(tag: Tag) {
-    if (tag.parent) {
+    if (this.autoHeirarchy && tag.parent) {
       // add all parents recursively
       const parent = this.getTag(tag.parent)
       this.value = [...this.value, parent.id]