z-song / demo.laravel-admin.org

Source code of official http://demo.laravel-admin.org website.
507 stars 250 forks source link

Problem on custom grid tools #29

Open enaeim opened 6 years ago

enaeim commented 6 years ago

Hi.

I use two grid on one page. and use custom grid tools on each gird. I use the code of below on the first grid tools: $grid->tools(function (Grid\Tools $tools) { $tools->batch(function (Grid\Tools\BatchActions $batch) { $batch->disableDelete(); foreach (Driver::active()->get() as $d) { $batch->add("$d->name", new SetDriver($d->id)); } }); });

and second gird: $grid->tools(function (Grid\Tools $tools) { $tools->batch(function (Grid\Tools\BatchActions $batch) { $batch->disableDelete(); $batch->add("Unset driver", new UnsetDriver(0)); $batch->add("done", new OrdersSetDone(0)); }); });

When I click on first grid tools all of things is OK. But I click on second grid tools (for example Unset driver) Both of the UnsetDriver() and SetDriver() are executed.

Please Help Me !!