Skip to content

Commit

Permalink
feat(controls): add data-has-value attribute that indicates that mo…
Browse files Browse the repository at this point in the history
…del has a value
  • Loading branch information
skoropadas committed Dec 21, 2023
1 parent 02328c8 commit 3e45f01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/di-controls/controls/control-value-accessor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ChangeDetectorRef,
Directive,
ElementRef,
ElementRef, HostBinding,
inject,
Input,
Renderer2, Signal,
Expand Down Expand Up @@ -39,6 +39,7 @@ export abstract class DIControlValueAccessor<T> implements ControlValueAccessor
/**
* Returns true if the control is not empty.
*/
@HostBinding('attr.data-has-value')
get hasValue(): boolean {
return hasValue(this.model());
}
Expand Down

0 comments on commit 3e45f01

Please sign in to comment.