Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #656 from Bruce17/patch-4
Browse files Browse the repository at this point in the history
Register events before datatable get initialized
  • Loading branch information
stwe authored Aug 6, 2017
2 parents d5c19fa + 7a930ee commit ddc2cb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/views/datatable/datatable_js.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@
$.extend(defaults, initialSearch);
if (!$.fn.dataTable.isDataTable(selector)) {
$(selector)
{% include 'SgDatatablesBundle:datatable:events.html.twig' %}
;
oTable = $(selector)
.DataTable(defaults)
.on('draw.dt', function() { postCreateDatatable({{ sg_datatables_view.ajax.pipeline}}) })
{% include 'SgDatatablesBundle:datatable:events.html.twig' %}
;
{% if true == sg_datatables_view.options.individualFiltering %}
Expand Down

0 comments on commit ddc2cb3

Please sign in to comment.