Angular 如何禁用启动p表选择模式?

Angular 如何禁用启动p表选择模式?,angular,primeng,Angular,Primeng,我正在使用角度素描(一个共享组件),并将我的[selectionMode]设置为多选。 现在,我只能通过单击行来选中复选框。我只想通过单击复选框本身来选中复选框 是否有方法禁用我的数据表的多选选择模式,以便我可以通过单击框本身而不是行来选中复选框?我无法从p表中删除selectionmode,因为它在多个位置使用 这是我的p表,它是一个共享组件。 <p-table #table [value]="data" [columns]="columns" [

我正在使用角度素描
(一个共享组件),并将我的
[selectionMode]
设置为
多选
。 现在,我只能通过单击行来选中复选框。我只想通过单击复选框本身来选中复选框

是否有方法禁用我的
数据表的
多选
选择模式
,以便我可以通过单击框本身而不是行来选中复选框?我无法从p表中删除
selectionmode
,因为它在多个位置使用

这是我的p表,它是一个共享组件。

<p-table #table [value]="data" [columns]="columns" [scrollable]="true" scrollHeight="420px" [(selection)]="selections"
   [selectionMode]="multiselect ? 'multiple' : 'single'" (onRowSelect)="onSelect($event)"
   (onRowUnselect)="onUnselect($event)" [sortField]="sortField" (onSort)="onSort($event)" [paginator]="paged"
   [rows]="pageSize" [rowsPerPageOptions]="ROWCOUNT_OPTIONS" [currentPageReportTemplate]="PAGE_REPORT"
   [showCurrentPageReport]="showCurrentPageReport" (onLazyLoad)="onLazyLoad($event)" (onPage)="onPageChange($event)"
   [lazy]="lazy" [lazyLoadOnInit]="lazyLoadOnInit" [loading]="loading" [totalRecords]="totalRecords"
   paginatorDropdownAppendTo="body" compareSelectionBy="equals" [class]="isEmpty ? 'h-scrollable' : ''"
   [resizableColumns]="true" columnResizeMode="expand">

这是我的html的用法:

<data-table #productTable [columns]="columns" [data]="data" [loading]="loading" [multiselect]="true" selectionmode = ""
   defaultSortField="necLec">
</data-table>

我把它修好了。我刚刚将selectionmode从multiple更改为none