import('bootstrap');
import $ from 'jquery';
import 'datatables.net-bs5';

$(function () {
    const table = $('.table-responsive')

    table.on('show.bs.dropdown', function () {
        $('#trialVersionTable').css("overflow", "inherit");
    });

    table.on('hide.bs.dropdown', function () {
        $('#trialVersionTable').css("overflow", "auto");
    })

    $('#trialVersionTable').DataTable({
        initComplete: function (settings, json) {
            $('input[type="search"]').first().focus();

        },
        stateSave: true,
        autoWidth: true,
        paging: true,
        ordering: true,
        order: [[0, "asc"]],
        serverSide: false,
        columnDefs: [
            {"targets": 3, "orderable": false},
        ]
    });
})