如何解决ngx-datatable - 支持使用“columns”表属性定义列的行内编辑?
我在 Angular 10 应用程序中使用了 ngx-data 表。表格列是通过 TypeScript 类中的数组属性定义的。
<ngx-datatable #simpleListTable id="simpleList"
class="material striped full-area-grid"
[rows] = "rows$ | async"
[columns]="columns"
[sorts]="sorts"
[scrollbarV]="true"
[footerHeight]="50"
[headerHeight]="50"
[rowHeight]="40"
[selected]="selected"
selectionType="checkBox"
[loadingIndicator]="isloading > 0"
[scrollbarV]="true"
[externalPaging]="true"
[externalSorting]="true"
[count]="totalRows$ | async"
[offset]="pageNumber$ | async"
(page)="setPage($event)"
(sort)="onSort($event)"
(select)="onSelect($event)"
>
</ngx-datatable>
this.columns = [
{ width: 30,sortable: false,canAutoResize: false,draggable: false,resizeable: false,headerCheckBoxable: true,checkBoxable: true},{ name: 'Date',prop: TaskQueryBuilder.FIELD_SCHEDULED_FINISH,pipe: this.tablePipes.datePipe,minWidth: 250},{ name: 'Task name',prop: TaskQueryBuilder.FIELD_NAME,minWidth: 350 },{ name: 'Priority',prop: TaskQueryBuilder.FIELD_PRIORITY,pipe: this.tablePipes.priorityPipe,minWidth: 80 },{ name: 'Status',prop: TaskQueryBuilder.FIELD_STATE,minWidth: 140,pipe: this.tablePipes.statusPipe},{ name: 'Folder',prop: TaskQueryBuilder.FIELD_FOLDER_OBJECT,pipe: this.tablePipes.folderPipe,sortable: false},{ name: 'Category',prop: TaskQueryBuilder.FIELD_CATEGORY_OBJECT,pipe: this.tablePipes.categoryPipe,sortable: false}
];
我想使用表格内联编辑。是否可以通过列定义来定义它?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。