Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.41k stars 206 forks source link

Action buttons with route functions are misaligned in the table #1561

Closed Rosembergg closed 1 month ago

Rosembergg commented 1 month ago

Have you searched through other issues to see if your problem is already reported or has been fixed?

Yes, I did not find it.

Did you read the documentation?

Yes, I did not find it.

Have you tried to publish the views?

Yes - I didn't work.

Is there an error in the console?

No

PHP Version

8.1.2

PowerGrid

5.1

Laravel

10.48.3

Livewire

3.0

Alpine JS

No response

Theme

Tailwind 3.x

Describe the bug.

Action buttons with route functions are misaligned in the table, however when using the dispatch function, the buttons have the correct style

To Reproduce...

erro_buttons

Extra information

public function actions(\App\Models\User $row): array
    {

        return [
            Button::add('edit')
                ->slot('Editar')
                ->class('bg-kblue cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->openModal('form-usuario-modal', ['id' => $row->id]),

            Button::add('permission')
                ->slot('Permissões')
                ->class('bg-korange cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->route('controle.permissoes', ['user_id' => $row->id]),

            Button::add('function')
                ->slot('Funções')
                ->class('bg-kblue cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->route('controle.funcoes', ['user_id' => $row->id]),

            Button::add('rh')
                ->slot('RH')
                ->class('bg-korange cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->openModal('form-colaborador-modal', ['user_id' => $row->id]),

            Button::add('activate')
                ->slot('Ativar')
                ->class('bg-green-600 cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->dispatch('ativar', ['id' => $row->id]),
        ];
    }
 <?php
 //...
luanfreitasdev commented 1 month ago

Fixed: https://github.com/Power-Components/livewire-powergrid/releases/tag/v5.6.4