Primeng don't display empty Message-row

2019-09-20 12:01发布

问题:

I use with Primeng datatable when No records found it display a row with message, how can I hide this row?

<p-dataTable>
              <p-column [style]="{'width': '500px'}" header="Artifacts">
                  <ng-template pTemplate="filter" let-col>
                      <textarea rows="3" cols="30" style="width: 100%" pInputTextarea [(ngModel)]="parametersForAll['Artifacts']"
                      placeholder="Artifacts ..."></textarea>
                  </ng-template>
                </p-column> 
    </p-dataTable>

回答1:

You can disable that with the help of following css

.ui-datatable-emptymessage{
display:none
}