Skip to content

Commit c16d1e0

Browse files
committed
add host attribute for current condition
1 parent 2fd6f23 commit c16d1e0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

projects/ngx-angular-query-builder/src/lib/query-builder/query-builder.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ import {
4747
SimpleChanges,
4848
TemplateRef,
4949
ViewChild,
50-
ElementRef
50+
ElementRef,
51+
HostBinding
5152
} from '@angular/core';
5253

5354
export const CONTROL_VALUE_ACCESSOR: any = {
@@ -114,6 +115,11 @@ export class QueryBuilderComponent implements OnChanges, ControlValueAccessor, V
114115
@Input() disabled = false;
115116
@Input() data: RuleSet = { condition: 'add', rules: [] };
116117

118+
119+
@HostBinding('attr.query-builder-condition') get condintion() {
120+
return this.data?.condition;
121+
}
122+
117123
// For ControlValueAccessor interface
118124
public onChangeCallback!: () => void;
119125
public onTouchedCallback!: () => any;

0 commit comments

Comments
 (0)