简体   繁体   中英

Deactivate selection mode in primeNg datatable

I have a primeng datatable and i want to find a solution to disable selection mode in my typescript depending on the actions i make.

Here is my code

handles the row Selection and Unselection

<p-dataTable [value]=”vtArray”selectionMode=”single” [(selection)]=”mySelection” (onRowSelect)=”onRowSelect($event)” (onRowUnselect)=”onRowUnselect($event)”>

解决办法是使用onRowSelect()方法并在里面添加逻辑,不需要去激活选择模式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM