使用 ngx-bootstrap typeahead 的自定义 ag-grid angular 单元格编辑组件无法正确显示
Custom ag-grid angular cell edit component using ngx-bootstrap typeahead not displaying properly
我创建了一个 ngx-bootstrap typeahead 组件,用作 ag-grid 应用程序中的下拉列表。问题是下拉框没有填充单元格。
<form [formGroup]="myForm">
<input formControlName="item"
[typeahead]="items"
[typeaheadScrollable]="true"
[typeaheadMinLength]="0"
(focusin)="$event.target.value = ''"
placeholder="Typeahead inside a form"
class="form-control">
</form>
您需要添加一个 class 以形成高度和宽度为 100% 的输入,还需要删除 .ag-theme-balham .ag-cell 的填充
::ng-deep .ag-theme-balham .ag-cell {
padding-left: 0px;
padding-right: 0px;
}
我在你的 stackblitz 上试过了,但无法保存这些更改。
我创建了一个 ngx-bootstrap typeahead 组件,用作 ag-grid 应用程序中的下拉列表。问题是下拉框没有填充单元格。
<form [formGroup]="myForm">
<input formControlName="item"
[typeahead]="items"
[typeaheadScrollable]="true"
[typeaheadMinLength]="0"
(focusin)="$event.target.value = ''"
placeholder="Typeahead inside a form"
class="form-control">
</form>
您需要添加一个 class 以形成高度和宽度为 100% 的输入,还需要删除 .ag-theme-balham .ag-cell 的填充
::ng-deep .ag-theme-balham .ag-cell {
padding-left: 0px;
padding-right: 0px;
}
我在你的 stackblitz 上试过了,但无法保存这些更改。