add a button after performing a search with the filter

add a button after performing a search with the filter

rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2

I'm using the editor , and I arose the next presgunta .
How I can add a botton after using the fitro ? I mean you can add a button if the search finds a result or not.

In search of the filter , that function I can know whether the search is has results or not. Because depending on this search pretend add a botton if the busqeuda is negative.

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    You could listen for the draw event to find out when the DataTable has been redrawn. When it is, use page.info() to find out if the table is displaying any records. If not show a button (which might be as simple as making it display: block rather than display: none.

    Allan

This discussion has been closed.