使用材料表与反应钩,我的愿望是重新指导onClick。目前,onClick没有响应性.
材料表组件
actions={[
{
onClick: (items) => {
/*
I want to re-direct to another route("/editperson") +
component(EditPerson.tsx) and send it props from this component
*/
}
我有一个后端数据库,以JSON文件的形式提供学生记录。然后将这些对象填充到PrimeNG表中,以供显示和选择。
student.component.html
<p-table class="table" [columns]="cols" [value]="searchResults">
<ng-template pTemplate="header" let-columns>
<tr>
<th *ngFor="let col of co