MedicOneSystems / livewire-datatables

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

Possible way to put an action button on the top right ? #61

Open isaackearl opened 3 years ago

isaackearl commented 3 years ago

Hello, amazing package BTW. I'm trying to use this package for creating Crud tables, and I want to add a "Create" button for making a new record. Was hoping I could custom implement something like this in a similar manner that you can do with the actions callback for a column that has custom actions (such as view, edit and delete). Is this possible? Or do I simply have to use the "beforeTableSlot" and put the button somewhere above the table? This is doable though it's not quite as ideal. If this isn't possible, then I guess this is my formal feature request.

Thanks!

GoodsMart commented 3 years ago

+1

johnneijzen commented 3 years ago

that would be cool if that is possible right now I have my add button in the top row bar instead :(

amaurycid commented 3 years ago

I've managed to do it by editing the datable.blade.php file.

stojankukrika commented 3 years ago

+1

dil-hf commented 3 years ago

+1

xTiiX commented 2 years ago

+1

jacquestvanzuydam commented 2 years ago

There's a property you can pass to your table beforeTableSlot where you can add a blade component.

That's how I did it anyway.

<livewire:tables.products beforeTableSlot="components.table-crud" />

edit: Sorry I see you mentioned it, should have read your issue more closely.