Power-Components / livewire-powergrid

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

Bulk Action with UUID #1602

Open luanfreitasdev opened 1 week ago

luanfreitasdev commented 1 week ago

Discussed in https://github.com/Power-Components/livewire-powergrid/discussions/1601

Originally posted by **mapism** June 23, 2024 Hi, I am trying to implement a simple bulk action, but my table has UUIDs. It seems like when clicking in the checkbox it only gets the first char of the id, so in a table like the one from the screenshot I only get "9" when console.log pgBulkActions.get() Is this a problem with uuid or am i doing something wrong? ![image](https://github.com/Power-Components/livewire-powergrid/assets/59127102/956f6af7-7496-414d-9170-f940fb57fbe4) Thanks in advance for your help! pd: notice the counter is 0, because an even number of rows is selected, so is selecting and deselecting "9". edit: when click on "check all" checkbox it works great, even if i deselect from there it still show me the correct uuids, the problem is when i start checking rows individually.
mapism commented 1 week ago

Edit2: Check all works only if no row is selected. It can select and deselect fine all rows. Selecting and deselecting rows individually after "check all" doesnt work at all.