I am having an issue when setting defaults for layouts and searchPanes in the new DataTables

I am having an issue when setting defaults for layouts and searchPanes in the new DataTables

hm123hm123 Posts: 84Questions: 27Answers: 1

Link to test case: https://live.datatables.net/rasamova/1/edit

Description of problem:

When using either of these methods:
DataTable.defaults.layout = {
or
Object.assign(DataTable.defaults, {

to set defaults for layout, paging, buttons and searchpanes, I get the unwanted effect of them showing up in the panes of searchPanes itself.

In my example, you can see a clone of the following elements:
Copy and SearchPanes
at the top of each searchPane, between the header and the data.

You can also see a clone of the pagination, at the bottom of each searchPane as well.

How can I set defaults for the layout as well as searchPanes, before initializating the datatable, without having these unwanted elements show up this way?

Furthermore, it seems that changing the pagination type from "inputPaging" to the regular "paging", seems to solve the issue of the pagination clone appearing in the searchTable. Is this bit a separate issue with the inputPaging feature?

Not directly related to the matter at hand: I notice that when using live.datatables.net, clicking on "Add libary" and then adding an extension, seems to add it at the very beginning of the head tag in the html, above the core jQuery and datatables js and css. Those extensions have to be placed below these in order for them to work correctly.

Sign In or Register to comment.