Button right next to the main search field

Button right next to the main search field

AndersHPAndersHP Posts: 36Questions: 14Answers: 1

Hi,

How could i insert a button to the right of the main search field? I need a search clear button, but not for the main searchfield only(i know theres one already) - also for the individual column ones.

I know how to do the clearing, but not how to insert at button in the datatables part of the dom.

Thanks in advance :)

This question has an accepted answers - jump to answer

Answers

  • AndersHPAndersHP Posts: 36Questions: 14Answers: 1
    edited September 2015

    Ok, i can do this in the datatables initComplete:

    $("#maintable_filter").append("<button> Something</button>")
    

    Seems a little hackish though, so if you have a better solution let me know. :)

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Currently the other option is to write a feature plug-in.

    It isn't an ideal situation I realise and the next major version of DataTables should address this.

    Allan

This discussion has been closed.