Editor - Buttons showing default - Export and not Editor Buttons
Editor - Buttons showing default - Export and not Editor Buttons
creatorDotJS
Posts: 20Questions: 6Answers: 0
in TableTools
Debugger: http://debug.datatables.net/iyadex
Buttons showing are default and not Editor Buttons. Any help would be great!
$.extend( $.fn.dataTable.defaults, {
"dom": "Tfrtip",
"responsive": true,
"destroy": true,
"processing": false,
"serverSide": false,
"columns": [
{ "data": "isChecked" },
{ "data": "newInvoiceNum" },
{ "data": "qfInvoiceNum" },
{ "data": "qfLineStr" },
{ "data": "unitName" },
{ "data": "orderPO" },
{ "data": "installDate" },
{ "data": "schedDate" },
{ "data": "typeName" },
{ "data": "areaName" },
{ "data": "invoiceTotal" }
],
"tableTools": {
sRowSelect: "os",
aButtons: [
{ sExtends: "editor_create", editor: editor },
{ sExtends: "editor_edit", editor: editor },
{ sExtends: "editor_remove", editor: editor }
]
}
} );
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I suspect the error might be occurring with the initialization of the editor.
I have a feeling that this is due to the defaults being used for the DataTables configuration, rather than direct initialisation with the configuration object. Are you able to update your initialisation to include, specifically the
tableTools
object, in the initialisation please? I would probably consider that best practice anyway (although this does look like it might be a bug / limitation in TableTools) since theeditor
instance is being used and set in the defaults, which could cause issues with any other tables that are also initialised.The other thing to try would be to use a deep extend - i.e.
$.extend( true, ... )
since the default is a shallow copy which might also be causing issues.Thanks,
Allan
Thank you Allan. Yes, it worked when I did a direct initialisation for the tableTools object with the configuration object. Thank you!