The problem was with DataTables initialization hierarchy in html page! my functions printCheckboxStatusDom()
, printCheckboxStatusTbl()
and $(document).ready(function(){...})
was stored in a javascript file my_scripts.js in a local dir, and the current page was like
{% include 'my_tbl_template.html' %};
<script>let my_tbl=$('#my_tbl').DataTable({...})</script>
<script type="text/javascript" src="my_scripts.js">
so I tried to to change the code to (init datatables at the end):
{% include 'my_tbl_template.html' %}
<script type="text/javascript" src="my_scripts.js">
<script>let my_tbl=$('#my_tbl').DataTable({...})</script>
And the problem solved!