How to get rid of the 'No records found message' in PrimeNG datatable?

前端 未结 1 908
醉话见心
醉话见心 2021-01-14 12:57

I created a data table using PrimeNG. I just created 2 headings for the datatable. I\'ll actually fetch the data from the server, hence if there is no data I do not want the

相关标签:
1条回答
  • 2021-01-14 13:17

    You can use the emptyMessage property to override this message :

    <p-dataTable emptyMessage="">
        ...
    </p-dataTable>
    

    Edit : If you don't want to see the border, hide ui-datatable-emptymessage class with CSS. Btw, you don't need to use emptyMessage property anymore in that case.

    .ui-datatable-emptymessage {
        display:none;
    }
    
    0 讨论(0)
提交回复
热议问题