How to show empty rows and not custom message in Datatables if there is no matching search?

How to show empty rows and not custom message in Datatables if there is no matching search?

ipivanovipivanov Posts: 1Questions: 1Answers: 0

As far as my research went i only could find how i can change the message "No matching records found" at my custom message.

If there is no matching result i want to be displayed 5 empty rows.

How to display empty rows if there is no matching search in Datatables if posible?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Answer ✓

    You could use draw and page.info() to discover when DataTables has drawn the table with no records shown. Then use a little bit of jQuery to just insert the empty rows you want.

    Allan

This discussion has been closed.