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.
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 !!