MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

Datatable displayed vertically #521

Closed marcoroma closed 1 year ago

marcoroma commented 1 year ago

Hi! I've a strange issue, I've created a simple datatable, but both the header and the data are showed vertically (like 1 column and all rows). Where I do Wrong?

public function columns()
{
    return [

        Column::name('id')
            ->label('ID')->sortBy('id'),

        Column::name('name')
            ->editable(),

        Column::name('description')
            ->editable(),

        DateColumn::name('activation_date')
            ->editable(),

    ];
}

`

Thank you very much!

renardudezert commented 1 year ago

Hi ! I encountered exactly the same issue with a fresh installation of Laravel (9). The solution for me was to publish config and assets

I hope this will help you !

marcoroma commented 1 year ago

Hi, thank you very much for your reply! I made a fresh installation of Laravel 9 and now I published config and asset with the command indicated, but I've the same problem.. Have you configured something in those files?

image

renardudezert commented 1 year ago

Hi, you're welcome ;) Laravel does not include tailwind by default since version 9. Instead, Mix has been replaced by Vite.

So you have to install tailwind and configure vite to use it. I advise you to follow this blog post which explains how to do it.

Regards

marcoroma commented 1 year ago

Thank you very much, I run npm run build and that's work!