From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:28:14 +0000 (-0800) Subject: Enhancement: allow tags list selection without auto parent/child X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature-auto-heirarchy-toggle;p=thirdparty%2Fpaperless-ngx.git Enhancement: allow tags list selection without auto parent/child --- diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html index fab644baa6..179e1c67eb 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -210,6 +210,7 @@ } @else if ( diff --git a/src-ui/src/app/components/common/input/tags/tags.component.ts b/src-ui/src/app/components/common/input/tags/tags.component.ts index 4546dabcb8..180ec6ff4a 100644 --- a/src-ui/src/app/components/common/input/tags/tags.component.ts +++ b/src-ui/src/app/components/common/input/tags/tags.component.ts @@ -103,6 +103,9 @@ export class TagsComponent implements OnInit, ControlValueAccessor { @Input() multiple: boolean = true + @Input() + autoHeirarchy: boolean = true + @Output() filterDocuments = new EventEmitter() @@ -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]