Skip to content

Commit d868b4b

Browse files
authored
Merge pull request #1 from raysuelzer/feature/query-builder-class-fn
add host attribute for current condition
2 parents 2fd6f23 + e77ed8c commit d868b4b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-angular-query-builder",
3-
"version": "0.0.0",
3+
"version": "0.0.2",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

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)