ColReorder & Custom Search Functions and Panes
ColReorder & Custom Search Functions and Panes
ArielSAdamsNASA
Posts: 105Questions: 15Answers: 0
Link to test case: http://live.datatables.net/kabisepe/2/edit
Description of problem: Is it possible to have custom searchPanes and implement ColReorder at the same time? Maybe by referring a column by name rather than a number? The saveState also must be true.
This question has an accepted answers - jump to answer
Answers
As an FYI - according to the Compatibility Matrix ColReorder is not compatibly with
stateSave
when using array based columns which you are as you aren't definingcolumns.data
. See the Data Sources docs for details.Use objects with
columns.data
. For example:http://live.datatables.net/quvanomu/1/edit
I updated your test case with
columns.data
. You are in luck - I found this in thecolumns.data
docs:Note: you will also need to access the row data using object notation, ie
rowData.position
, instead of array notationrowData[1]
.Kevin
@kthorngren
How would I hide the office column in the searchPanes? ColumnDefs is not working as seen here: http://live.datatables.net/quvanomu/7/edit
Edit: Also is viewTotal not compatible? When I try to implement it, I get the error Uncaught TypeError: Cannot read properties of undefined (reading 'sDefaultContent')
http://live.datatables.net/quvanomu/6/edit
I don't see the Office column. Maybe you need to clear the state.
Kevin
@kthorngren
Thanks! I cleared the state and it works. As for the viewTotal, I just forgot the cascadePanes.
@kthorngren
I found a bug with the nightly version of SearchPanes AND version 2.0.0.
http://live.datatables.net/jahazase/17/edit
After you move around the columns a little bit using colReorder and try to click on a filter in the searchPanes, the filter is no longer clickable.
@sandy
Will this be fixed in the next version of SearchPanes or the nightly version?
@kthorngren
@sandy
Also, for my current setup: http://live.datatables.net/jahazase/19/edit
There are duplicate filters or searchpanes in only safari. For example, there is a custom "New or Maintenance" filter and there is an auto generated "New or Maintenance" filter. This only occurs in Safari. I only want the custom panes or filters to show.