I 둥지 input
태그 :입력 태그를 중첩하는 동안 테이블 셀의 증가를 방지하려면 어떻게해야합니까? 조건에 의해
<td *ngFor="let cell of row.Persons">
<span cell.editable === true ">
<input type="number" [(ngModel)]="cell.PersonCount" autofocus />
</span>
<span *ngIf="cell.editable === false " (click)="toggle(cell)">
{{ cell.PersonCount ? cell.PersonCount : '-' }}
</span>
</td>
input
태그없이 테이블 셀 Person
의 폭은 다음과 같습니다
및 Person
셀 input
태그가있는 경우 다음 스타일을 설정하려고했지만 결과가 없습니다.
<input type="number" [(ngModel)]="cell.PersonCount"
style="display: inline; max-width: 100%; width: inherit; height:
inherit; box-sizing: border-box !important; overflow:hidden;
-moz-box-sizing: border-box !important;
-webkit-box-sizing: border-box !important; border: none;" autofocus />
내 질문은 더 input
태그는 (첫 번째 이미지 등)이없는 것처럼이 동일하게 셀의 크기를 유지할 수있는 방법을 입니까?
an example at plunker을 작성했습니다. 참조하십시오.
체크 최소 폭을. – lexith
@lexith 'min-width'에 어떤 값을 설정해야합니까? – StepUp
너비를 100 %로 설정하고 최소 너비를 0으로 설정합니다. – lexith