คำถามติดแท็ก ngx-datatable

2
Component แบบไดนามิกภายใน ngx-datatable-detail-row
ฉันกำลังสร้าง datatable ที่สามารถใช้ซ้ำได้โดยใช้ ngx-datatable และฉันต้องการให้ส่วนประกอบแบบไดนามิกแสดงผลภายในรายละเอียดแถว องค์ประกอบ DataTable ได้รับชั้นองค์ประกอบเป็นอาร์กิวเมนต์จากโมดูลหลักและฉันใช้ ComponentFactory เพื่อ createComponent ฉันเห็นว่าตัวสร้างและเมธอด onInit กำลังรันสำหรับคอมโพเนนต์แบบไดนามิก แต่ไม่ได้ถูกแนบกับ DOM นี่คือสิ่งที่ HTML DataTable ดูเหมือนว่าสำหรับรายละเอียดแถว: <!-- [Row Detail Template] --> <ngx-datatable-row-detail rowHeight="100" #myDetailRow (toggle)="onDetailToggle($event)"> <ng-template let-row="row" #dynamicPlaceholder let-expanded="expanded" ngx-datatable-row-detail-template> </ng-template> </ngx-datatable-row-detail> <!-- [/Row Detail Template] --> และนี่คือลักษณะของไฟล์. ts ของฉัน: @ViewChild('myDetailRow', {static: true, read: ViewContainerRef}) myDetailRow: …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.