Implementing searchPane feature

Implementing searchPane feature

Wizard123Wizard123 Posts: 1Questions: 1Answers: 0
edited March 2018 in Free community support

Hi,

I have a history.vue file. In order to implement searchPane plugin from datatable I did the following:

I added the two files that are required:
//cdn.datatables.net/plug-ins/preview/searchPane/dataTables.searchPane.min.css
//cdn.datatables.net/plug-ins/preview/searchPane/dataTables.searchPane.min.js

Then at the place where DataTable is implemented
I changed the line from this.history_table = $('#history-table').DataTable(this.params.history);
to this.history_table = $('#history-table').DataTable( {data:this.params.history, searchPane:true} );

But, after this change my history table disappeared and I don't know how to proceed.

Please help.

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    It looks like you have changed from passing this.params.history as the entire configuration object to being the data parameter, which is probably going to go wrong.

    How about:

    this.params.history.searchPane = true;
    this.history_table = $('#history-table').DataTable(this.params.history);
    

    Allan

This discussion has been closed.