laravel-livewire-tables icon indicating copy to clipboard operation
laravel-livewire-tables copied to clipboard

[Bug]: Incorrect work filters and blade view Laravel 11, Livewire 3

Open rah-emil opened this issue 1 year ago • 3 comments

What happened?

Just see video, please: https://drive.google.com/file/d/1_st0p4Y9mrqneEfHWiOk3KN3GK7-MZqB/view?usp=drive_link

Alpine:

       <!-- ... other code -->

        <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
    </body>
</html>

My table component:

<?php

namespace App\Livewire\Components\Incidents;

use App\Models\Incident;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column;


class IncidentsTable extends DataTableComponent
{
    protected $model = Incident::class;
    public string $tableName = 'incidents';

    public function configure(): void
    {
        $this->setPrimaryKey('id')
            ->setDefaultSort('id', 'desc')
            ->setReorderStatus(false)
            ->setColumnSelectStatus(true);
    }

    public function columns(): array
    {
        return [
            Column::make('ID', 'id'),
            Column::make('Status', 'status'),
            Column::make('Topic', 'topic'),
            Column::make('Type', 'type'),
            Column::make('Level Priority', 'priority'),
        ];
    }
}

My livewire blade:

<div>
    <livewire:components.incidents.incidents-table />
</div>

How to reproduce the bug

Please, see the video

Package Version

3.2.4

PHP Version

8.3.x

Laravel Version

11.4.0

Alpine Version

3.X.X

Theme

Tailwind 3.x

Notes

I checked all your documentation

Error Message

All errors inside the video

rah-emil avatar Apr 24 '24 14:04 rah-emil

Please note that the video needs to be public. No one is currently able to see the video.

grzegorzkibitz avatar Apr 29 '24 19:04 grzegorzkibitz

Please note that the video needs to be public. No one is currently able to see the video.

My bad) I did it, you can see: https://drive.google.com/file/d/1_st0p4Y9mrqneEfHWiOk3KN3GK7-MZqB/view?usp=sharing

rah-emil avatar Apr 30 '24 04:04 rah-emil

@rah-emil I had the same experience, This be worth a try. lucky i realised quite quickly and didn't spend to much time chasing my tail! Stop vite services and re-run npm run build, once complete restart npm run dev.

apydevs avatar May 02 '24 21:05 apydevs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 02 '24 12:06 stale[bot]

Worth noting, Livewire v3 bundles in AlpineJS, so you shouldn't be using a cdn for Alpine, as it'll cause Livewire itself to throw a tantrum.

lrljoe avatar Jun 08 '24 08:06 lrljoe