| 13 | describe('Signal Forms array removal orphan repro', () => { |
| 14 | it('should not throw orphan field error when a focused input in an array is removed', async () => { |
| 15 | @Component({ |
| 16 | imports: [FormField], |
| 17 | template: ` |
| 18 | <div> |
| 19 | @for (child of f.items; track $index) { |
| 20 | <input [formField]="child.name" [id]="'input-' + $index" /> |
| 21 | } |
| 22 | </div> |
| 23 | `, |
| 24 | }) |
| 25 | class ReproCmp { |
| 26 | readonly model = signal({ |
| 27 | items: [{name: 'one'}, {name: 'two'}], |
| 28 | }); |
| 29 | readonly f = form(this.model); |
| 30 | } |
| 31 | |
| 32 | const fixture = TestBed.createComponent(ReproCmp); |
| 33 | const appRef = TestBed.inject(ApplicationRef); |
nothing calls this directly
no test coverage detected
searching dependent graphs…