To process your bulk action you must have a method on the component with the same name as the key in the bulk actions array:
1public array $bulkActions = [
2 'exportSelected' => 'Export',
3];
4
5public function exportSelected()
6{
7
8}
You have access to the selectedKeys method to grab the IDs of the rows that were selected:
1public function exportSelected()
2{
3 foreach($this->getSelected() as $item)
4 {
5 // These are strings since they came from an HTML element
6 }
7}
#Resetting
After you process your action you'll probably want to reset the screen back to normal, for this you can call the clearSelected method at the end:
1public function exportSelected()
2{
3 ...
4
5 $this->clearSelected();
6}