My table is populated with dynamic rows of input boxes, some of which may have a default value while others return an empty string ''
. This causes the table to collapse on those inputs.
<tr *ngFor="let d of displayData">
<td class=".mytable"> {{d.specRow}} </td>
<td *ngFor="let l of d.limitModel ">
<input type="text" [ngModel]="l?.target" (ngModelChange)="changeSelectedItem($event, l)" [name]="l.target" />
</td>
Clicking in the input box next to Comment 4
adds more rows until it reaches the next input with an empty string. How can I make these rows render with an empty string when they are tied to a model?
https://i.stack.imgur.com/kC3J4.png
EDIT: The rows load correctly when not bound with ngModel. The issue arises when binding to an empty string.