Keep childRows open with responsive?

Keep childRows open with responsive?

ddryferddryfer Posts: 6Questions: 2Answers: 0
edited November 2020 in Free community support

I have a table with childRows as this example:
https://datatables.net/examples/api/row_details.html

Also added:

<script src="../vendor/datatables/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables/responsive/dataTables.responsive.min.js"></script>
<script src="../vendor/datatables/responsive/responsive.bootstrap4.min.js"></script>
<script src="../vendor/datatables/dataTables.bootstrap4.min.js"></script>

$(document).ready(function() {
    var table = $('#example').DataTable( {
        "ajax": "../ajax/data/objects.txt",
        "responsive": true,  
        "columns": [
            {
                "className":      'details-control',
                "orderable":      false,
                "data":           null,
                "defaultContent": ''
            },
            { "data": "name" },
            { "data": "position" },
            { "data": "office" },
            { "data": "salary" }
        ],
        "rowId":'name',
        "order": [[1, 'asc']]
    } );

But when trying to use ajax.reload(false,null) in a button, the already opened childRows close.

Reading this post: https://datatables.net/forums/discussion/43577/rows-close-when-ajax-updates
I think Responsive should open the rows automatically when the table redraw, is that true? or should I change something?

This discussion has been closed.