admin管理员组

文章数量:1125616

I'm using datatable in my application downlaoded from link

Works well with wire:navigate and even #[Lazy] but I implemented checkbox for each row in table and once i click checkbox to run function, this table stop working i mean all filters and sorting. Script to run this script after page is loaded:

<div x-data="initFilters()"></div>
@script
<script>
    Alpine.data('initFilters',() => ({
        init() {
            let tf_config = {
                sort: true,
                alternate_rows: false,
                status: false,
                sort_config: {
                    sort_types:['String','String','Number','Number','Number','Number','Number','String']
                },
                display_all_text: "< Show All >",
                col_0: 'input',
                col_1: 'select',
                col_2: 'select',
                col_3: 'select',
                col_4: 'select',
                col_5: 'input',
                col_6: 'select',
                col_9: 'select',

                external_flt_grid: true,
                external_flt_grid_ids: ['intOrderId','strLoadId','strDemandType','strDeliveryMethod','strDeliveryDate','strRange'],
                

            };
            setFilterGrid("table",tf_config);

        }}));

</script>
@endscript

Checkbox:

<input type="checkbox" wire:click="checked({{ $item->intOrderId  }})"  >

Table before i click checkbox: Before

After click checkbox After Maybe someone have had this problem?

本文标签: Laravel Livewire script stop working after wireclickStack Overflow