Ho was to select all for CRUD selection check boxes?

#1

Hi,

I am using CRUD addSelection() to perform actions on records. I frequently need to select 20+ records. Does anyone know how to create a select all action to select all checboxes on CRUD grid?

Thanks!

#2

Hello.

I use this:

        $actions = $grid->menu->addMenu(['icon' => 'tasks']);

    $actions->addItem(['Check All', 'icon' => 'check square outline'])->on(
        'click',
        $this->js()->find('.ui.checkbox')->checkbox('check')
    );

    $actions->addItem(['Uncheck All', 'icon' => 'square outline'])->on(
        'click',
        $this->js()->find('.ui.checkbox')->checkbox('uncheck')
    );
#3

@zak Thanks! This worked perfectly.

1 Like