Search question

Search question

balajispnbalajispn Posts: 1Questions: 1Answers: 0
edited August 2017 in Free community support

Hi,
When I do a search on a datatable, are there any options to match only the characters from the first or the last - sort of like 'xyz%' or '%xyz'. Just plain simple character matching (nothing special with Regex needed here). Right now, it searches for '%xyz%' and I want to know if there are anyways to customize this. Pl advise.

              dbTable.columns().every(function(){
                 var dbTableColumn = this;
                    $(this.footer()).find('input').on('keyup change', function(){
                console.log('inside keyup event' + this.value);

                dbTableColumn.search(this.value).draw();

                });

               });

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Currently no. That is something I want to address in the next major version - although as I've just written in a different thread, I don't expect that to be until sometime in 2018. Until then you would need to modify the DataTables source or use a custom search plug-in.

    Allan

This discussion has been closed.