Cannot extend unknown button type: create
Cannot extend unknown button type: create

Anyone could help me with this error?
This is my code:
<script src="{% static "private/design_one/js/datatables_editor/jquery.dataTables.min.js" %}"></script>
<script src="{% static "private/design_one/js/datatables_editor/dataTables.buttons.min.js" %}"></script>
<script src="{% static "private/design_one/js/datatables_editor/dataTables.select.min.js" %}"></script>
<script src="{% static "private/design_one/js/datatables_editor/dataTables.editor.min.js" %}"></script>
<script>
$(document).ready(function() {
var editor = new $.fn.dataTable.Editor( {
ajax: '/api/staff',
table: '#phones',
fields: [
{ label: 'First name', name: 'first_name' },
{ label: 'Last name', name: 'last_name' },
// etc
]
} );
$('#phones').DataTable( {
dom: "Bfrtip",
processing: true,
serverSide: true,
ajax: "{{ api_url }}",
dataSrc: 'data',
columns: [
{ data: 'id' },
{ data: 'client.name' },
{ data: 'client.comercial_name' },
{ data: 'number' }
],
paging: true,
select: true,
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
});
} );
</script>
This discussion has been closed.
Answers
What version of Editor are you loading in?
Allan
DataTables 1.10.10
dataTables.editor.min.js Version: 1.5.4
any ideas?
That's odd - I was expecting 1.4 or earlier based on the error you are seeing. The
create
button was added in 1.5.0.Could you give me a link to the page you are working on so I can debug it please?
Thanks,
Allan
For the moment it's a local development but I can configure a new server instance for your debug, if it is needed.
Yesterday I decided realize a new test changing the code basing on this example https://editor.datatables.net/examples/simple/inTableControls.html
But now the error is the following: TypeError: o[m] is undefined
I thought it would be easier...
Heh - unfortunately not. I'm afraid I don't know what would cause the error you are seeing there - the o[m] is part of the obfuscated trial code.
Allan
What can I do? any ideas?
I'd need a link to the page please.
Allan