我正在使用ngx-datatable,我想在dblclick (使用this)上选择行。但问题是,这些行当然不是“轻装上阵”。
基本上,为了在单击时激活行突出显示,您需要向<ngx-datatable></ngx-datatable>添加[selectionType]="'single'"输入。有没有办法触发这种效果呢?
发布于 2018-05-23 19:05:20
(select)="onSelect($event)"
[selected]="activeRecords"在html模板中使用上述两行代码,并在您的typescript代码中编写onSelect(),如下所示
activeRecords = [];
onSelect() {
this.activeRecords = [];
this.activeRecords.push(event.selected[0]);
}https://stackoverflow.com/questions/47222838
复制相似问题