* Binds a status property to FVC, falling back to native DOM if FVC lacks the input.
(
host: ControlDirectiveHost,
bindings: Record<string, unknown>,
name: 'disabled' | 'touched' | 'dirty' | 'valid' | 'invalid' | 'pending' | 'required',
value: boolean,
)
| 432 | * Binds a status property to FVC, falling back to native DOM if FVC lacks the input. |
| 433 | */ |
| 434 | private bindControlProperty( |
| 435 | host: ControlDirectiveHost, |
| 436 | bindings: Record<string, unknown>, |
| 437 | name: 'disabled' | 'touched' | 'dirty' | 'valid' | 'invalid' | 'pending' | 'required', |
| 438 | value: boolean, |
| 439 | ): void { |
| 440 | if (bindings[name] === value) { |
| 441 | return; |
| 442 | } |
| 443 | bindings[name] = value; |
| 444 | |
| 445 | // Try setting on the custom control first. |
| 446 | const wasSet = host.setInputOnDirectives(name, value); |
| 447 | |
| 448 | // Fall back to native DOM property for 'disabled' and 'required' |
| 449 | if ( |
| 450 | this.isNativeFormElement && |
| 451 | !wasSet && |
| 452 | (name === 'disabled' || name === 'required') && |
| 453 | this.renderer |
| 454 | ) { |
| 455 | setNativeDomProperty(this.renderer, host.nativeElement as NativeFormControl, name, value); |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | /** |
| 460 | * Converts Reactive Forms errors to Signal Forms error format. |
nothing calls this directly
no test coverage detected