SearchPanes Button: init issue ?
SearchPanes Button: init issue ?

I use SearchPanes Button. Could it be, that the SearchPanes initialization parameters are not evaluated?
Within the init function, i have added the variable 'opts':
$.fn.dataTable.ext.buttons.searchPanes = {
text: 'Search Panes',
init: function (dt, node, config) {
var opts = {};
if (dt.init().searchPanes && dt.init().searchPanes.dtOpts)
opts = dt.init().searchPanes.dtOpts;**
var panes = new $.fn.dataTable.SearchPanes(dt, {
dtOpts: opts,
filterChanged: function (count) {
dt.button(node).text(dt.i18n('searchPanes.collapse', { 0: 'SearchPanes', _: 'SearchPanes (%d)' }, count));
}
});
This discussion has been closed.
Answers
Hi @martinxmueller ,
Would you mind creating a test case for this please so that we can see exactly what your problem is? Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
Hi,
in the nightly file from SearchPanes (2020-04-19), the problem is solved. You can define SearchPanes initial parameters within the button definition:
buttons:[
{
extend: 'searchPanes',
config: { threshold: 0.7, dtOpts: { pageLength: 250 } }
},
'searchPanesClear'
]